Merge branch 'bonus-jyy-smart-canteen' of http://192.168.0.75:3000/bonus/bonus-ui into bonus-jyy-smart-canteen

This commit is contained in:
zzyuan 2025-06-13 16:53:52 +08:00
commit 0e91e89fef
4 changed files with 44 additions and 8 deletions

View File

@ -35,7 +35,17 @@ export function editHealthScienceApi(data) {
data: 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) { export function delHealthScienceApi(Id) {
return request({ return request({
@ -94,9 +104,9 @@ export function editChronicApi(data) {
}) })
} }
// 慢性病-更新 // 慢性病-更新
export function delChronicApi(chronicId) { export function delChronicApi(Id) {
return request({ return request({
url: '/smart-canteen/health_chronic/del/'+chronicId, url: '/smart-canteen/health_chronic/del/'+Id,
method: 'post', method: 'post',
headers: { headers: {
"merchant-id":"378915229716713472", "merchant-id":"378915229716713472",

View File

@ -477,6 +477,7 @@ export default {
"articleTitle":this.queryParams.articleTitle, "articleTitle":this.queryParams.articleTitle,
"articleType":this.queryParams.articleType, "articleType":this.queryParams.articleType,
"chronicIds":this.queryParams.chronicList.join(",")||"", "chronicIds":this.queryParams.chronicList.join(",")||"",
"deptIds":this.queryParams.deptIdList.join(",")||"",
"startDate":this.formatDate(this.dateRange[0]), "startDate":this.formatDate(this.dateRange[0]),
"endDate":this.formatDate(this.dateRange[1]) "endDate":this.formatDate(this.dateRange[1])
} }

View File

@ -76,7 +76,14 @@
<el-table-column label="发布时间" align="center" prop="pushTime" :show-overflow-tooltip="true"> <el-table-column label="发布时间" align="center" prop="pushTime" :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column label="可见状态" align="center" prop="ifVisible" :show-overflow-tooltip="true"> <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>
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right"> <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@ -172,7 +179,7 @@
</template> </template>
<script> <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' import { imgUpLoadTwo } from '@/api/system/upload'
export default { export default {
@ -367,7 +374,6 @@ export default {
this.form.chronicIds = "" this.form.chronicIds = ""
} }
this.form.coverPhoto = this.checkUrlList[0] this.form.coverPhoto = this.checkUrlList[0]
console.log("eitdfrom",this.form)
if (this.form.articleId != undefined) { if (this.form.articleId != undefined) {
editHealthScienceApi(this.form).then(response => { editHealthScienceApi(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -438,7 +444,25 @@ export default {
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0 const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0'); const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`; 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> </script>

View File

@ -975,7 +975,7 @@
"areaId": "", "areaId": "",
"ifRelateDrp": 2, "ifRelateDrp": 2,
"imgUrl": "", "imgUrl": "",
} }
this.resetForm("baseForm"); this.resetForm("baseForm");
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -1229,6 +1229,7 @@
"putawayState": this.queryShopParams.putawayState, "putawayState": this.queryShopParams.putawayState,
"materialName":this.queryShopParams.materialName, "materialName":this.queryShopParams.materialName,
"barCode":this.queryShopParams.barCode, "barCode":this.queryShopParams.barCode,
"supermarketId":this.selectSupermarketId
} }
console.log("this.queryShopParams",param) console.log("this.queryShopParams",param)
shopPageListApi(param).then(response => { shopPageListApi(param).then(response => {