xinli/xinlidsj/api/psychology/chartTemplate.js
2026-02-24 16:49:05 +08:00

39 lines
992 B
JavaScript

import { request } from '../../utils/request'
export function listChartTemplate({ keyword = '', chartType = '', scope = 'all' } = {}) {
let url = `/psychology/chartTemplate/list?scope=${encodeURIComponent(scope)}`
if (keyword) url += `&keyword=${encodeURIComponent(keyword)}`
if (chartType) url += `&chartType=${encodeURIComponent(chartType)}`
return request({ url, method: 'GET' })
}
export function getChartTemplate(templateId) {
return request({
url: '/psychology/chartTemplate/' + encodeURIComponent(templateId),
method: 'GET'
})
}
export function addChartTemplate(payload) {
return request({
url: '/psychology/chartTemplate',
method: 'POST',
data: payload
})
}
export function updateChartTemplate(payload) {
return request({
url: '/psychology/chartTemplate',
method: 'PUT',
data: payload
})
}
export function deleteChartTemplate(templateId) {
return request({
url: '/psychology/chartTemplate/' + encodeURIComponent(templateId),
method: 'DELETE'
})
}