jsk 健康bug修正
This commit is contained in:
parent
7a4eb580a9
commit
bc572b5b4b
|
|
@ -35,7 +35,17 @@ export function editHealthScienceApi(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 营养科普-编辑状态
|
||||
export function editHealthScienceStateApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/health_popular_article/editState',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 营养科普-删除
|
||||
export function delHealthScienceApi(Id) {
|
||||
return request({
|
||||
|
|
@ -94,9 +104,9 @@ export function editChronicApi(data) {
|
|||
})
|
||||
}
|
||||
// 慢性病-更新
|
||||
export function delChronicApi(chronicId) {
|
||||
export function delChronicApi(Id) {
|
||||
return request({
|
||||
url: '/smart-canteen/health_chronic/del/'+chronicId,
|
||||
url: '/smart-canteen/health_chronic/del/'+Id,
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
|
|||
|
|
@ -477,6 +477,7 @@ export default {
|
|||
"articleTitle":this.queryParams.articleTitle,
|
||||
"articleType":this.queryParams.articleType,
|
||||
"chronicIds":this.queryParams.chronicList.join(",")||"",
|
||||
"deptIds":this.queryParams.deptIdList.join(",")||"",
|
||||
"startDate":this.formatDate(this.dateRange[0]),
|
||||
"endDate":this.formatDate(this.dateRange[1])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,14 @@
|
|||
<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">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span>{{ '否' }}</span>
|
||||
<el-switch
|
||||
v-model="scope.row.ifPushed=='2'?false:true"
|
||||
@change="handleIfPushedChange(scope.row)">
|
||||
</el-switch>
|
||||
<span>{{ '是' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -172,7 +179,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { dictHealthChronicApi,getHealthSciencePageApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi } from "@/api/healthCenter/index";
|
||||
import { dictHealthChronicApi,getHealthSciencePageApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,editHealthScienceStateApi } from "@/api/healthCenter/index";
|
||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||
|
||||
export default {
|
||||
|
|
@ -367,7 +374,6 @@ export default {
|
|||
this.form.chronicIds = ""
|
||||
}
|
||||
this.form.coverPhoto = this.checkUrlList[0]
|
||||
console.log("eitdfrom",this.form)
|
||||
if (this.form.articleId != undefined) {
|
||||
editHealthScienceApi(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
|
@ -438,7 +444,25 @@ export default {
|
|||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
},
|
||||
handleIfPushedChange(row){
|
||||
let pws=row.ifPushed;
|
||||
let param={}
|
||||
if(pws=="1"){
|
||||
param={
|
||||
articleId:row.articleId,
|
||||
ifPushed:"2"
|
||||
}
|
||||
}else if(pws=="2"){
|
||||
param={
|
||||
articleId:row.articleId,
|
||||
ifPushed:"1"
|
||||
}
|
||||
}
|
||||
editHealthScienceStateApi(param).then(response => {
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue