jsk 健康

This commit is contained in:
skjia 2025-06-03 10:13:53 +08:00
parent 145203c688
commit 3ae92d2829
3 changed files with 44 additions and 53 deletions

View File

@ -56,15 +56,8 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
@click="handleUpdate2(scope.row)"
>体检报告</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -85,13 +85,11 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>

View File

@ -17,22 +17,22 @@
<el-form-item label="文章标题">
<el-input v-model="queryParams.articleTitle" placeholder="请输入文章标题" maxlength="20" clearable style="width: 220px"/>
</el-form-item>
<el-form-item label="适用慢性病">
<el-select v-model="queryParams.chronicList" multiple style="width: 220px" clearable collapse-tags>
<el-option v-for="item in chronicOptions"
:key="item.chronicId"
:label="item.chronicName"
:value="item.chronicId"
></el-option>
</el-select>
></el-option>
</el-select>
</el-form-item>
<el-form-item label="文章类型">
<el-select v-model="queryParams.articleType" style="width: 220px" clearable collapse-tags>
<el-option label="原创" value="1"></el-option>
<el-option label="转载" value="2"></el-option>
</el-select>
</el-form-item>
<el-option label="转载" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@ -47,18 +47,18 @@
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
@click="handleAdd"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableListData" height="800" ref="multipleTable">
<el-table v-loading="loading" :data="tableListData" height="800" ref="multipleTable">
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="封面照片" align="center" prop="coverPhoto" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<img :src="scope.row.coverPhoto" v-if="scope.row.coverPhoto" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
@ -71,26 +71,26 @@
<template slot-scope="scope">
<span v-if="scope.row.articleType==1">原创</span>
<span v-if="scope.row.articleType==2">转载</span>
</template>
</template>
</el-table-column>
<el-table-column label="发布时间" align="center" prop="pushTime" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column label="可见状态" align="center" prop="ifVisible" :show-overflow-tooltip="true">
</el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
@ -104,7 +104,7 @@
@pagination="getList"
/>
<!-- 对话框 -->
<!-- 对话框 -->
<el-dialog :title="title" :visible.sync="open" width="980px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-row>
@ -125,10 +125,10 @@
:key="item.chronicId"
:label="item.chronicName"
:value="item.chronicId"
></el-option>
</el-select>
</el-form-item>
</el-col>
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="文章封面" prop="coverPhoto">
<el-upload
@ -149,7 +149,7 @@
<i
class="el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="24">
@ -171,7 +171,7 @@
</div>
</template>
<script>
<script>
import { dictHealthChronicApi,getHealthSciencePageApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi } from "@/api/healthCenter/index";
import { imgUpLoadTwo } from '@/api/system/upload'
@ -196,7 +196,7 @@ export default {
tableListData: [],
title:"",
//
open: false,
open: false,
dateRange:[new Date(),new Date()],
pickerOptions: {
shortcuts: [{
@ -232,7 +232,7 @@ export default {
pageSize: 10,
articleTitle: undefined,//
chronicList:[], //
articleType:null //
articleType:null //
},
form: {
articleTitle:null,
@ -240,7 +240,7 @@ export default {
chronicIdList:[],
coverPhoto:null,
articleType:1,
articleContent:null,
articleContent:null,
},//
rules: {
articleTitle: [
@ -249,15 +249,15 @@ export default {
articleContent: [
{ required: true, message: "文章内容不能为空", trigger: "blur" }
]
},
},
fileList: [],//
checkUrlList: [],//
checkUrlNameList: [],//
dialogVisible:false,//
dialogImageUrl:"",//
dialogImageUrl:"",//
};
},
created() {
created() {
this.getList()
this.getChronicList()
},
@ -267,13 +267,13 @@ export default {
return this.checkUrlList.length > 0
},
},
methods: {
methods: {
//
getChronicList() {
dictHealthChronicApi({}).then((response) => {
this.chronicOptions = response.data;
});
},
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -287,15 +287,15 @@ export default {
pageSize: 10,
articleTitle: undefined,//
chronicList:[], //
articleType:null //
articleType:null //
}
this.resetForm("queryForm");
this.handleQuery();
},
/** 查询列表 */
getList() {
this.loading = true;
let param = {
this.loading = true;
let param = {
"pageNum":this.queryParams.pageNum,
"pageSize":this.queryParams.pageSize,
"articleTitle":this.queryParams.articleTitle,
@ -331,7 +331,7 @@ export default {
chronicIdList:[],
coverPhoto:null,
articleType:1,
articleContent: null,
articleContent: null,
};
this.resetForm("form");
},
@ -362,8 +362,8 @@ export default {
}else{
this.form.chronicIds = ""
}
this.form.coverPhoto = this.checkUrlList[0]
this.form.coverPhoto = this.checkUrlList[0]
if (this.form.articleId != undefined) {
editHealthScienceApi(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
@ -380,14 +380,14 @@ export default {
}
});
},
handleDelete(row) {
handleDelete(row) {
this.$modal.confirm('是否确认删除数据项?').then(function() {
return delHealthScienceApi(row.articleId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
},
openImg(row) {
this.dialogImageUrl = row.coverPhoto;
this.dialogVisible = true;
@ -400,17 +400,17 @@ export default {
if (res.code == 200) {
this.checkUrlList.push(res.data.url)
this.checkUrlNameList.push(res.data.name)
} else {
} else {
this.$modal.msgError(res.msg)
}
})
.catch((error) => {
.catch((error) => {
this.$modal.msgError(error)
})
},
handleAvatarSuccess(res, file) {
console.log('success')
},
},
handleRemove(file, fileList) {
let sum = 0
this.checkUrlNameList.forEach((item, index) => {
@ -422,7 +422,7 @@ export default {
this.checkUrlList.splice(sum, 1)
},
//
handlePictureCardPreview(file) {
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
@ -433,7 +433,7 @@ export default {
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
}
}
}
};
</script>