2023.11.1修改

This commit is contained in:
阿怪 2023-11-01 00:35:17 +08:00
parent ea2d0b88cd
commit 2ad1bf1938
3 changed files with 28 additions and 26 deletions

View File

@ -2,7 +2,7 @@ ENV = 'development'
VITE_CLI_PORT = 8088 VITE_CLI_PORT = 8088
VITE_SERVER_PORT = 8888 VITE_SERVER_PORT = 8888
VITE_BASE_API = /api VITE_BASE_API = /api
VITE_BASE_PATH = http://f968894.r2.cpolar.top VITE_BASE_PATH = http://410fed99.r6.cpolar.top
VITE_EDITOR = vscode VITE_EDITOR = vscode
// VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm // VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm
// 如果使用docker-compose开发模式设置为下面的地址或本机主机IP // 如果使用docker-compose开发模式设置为下面的地址或本机主机IP

View File

@ -16,7 +16,7 @@ const api = {
}, },
editHospital: data => { editHospital: data => {
return service({ return service({
url: '/article', url: '/hospital',
method: 'put', method: 'put',
data data
}) })

View File

@ -51,6 +51,7 @@ const question_form = ref({
answer: '', answer: '',
title: '' title: ''
}) })
const apiForm = ref(null)
const note_list = ref([ const note_list = ref([
// { // {
// content: '', // content: '',
@ -96,18 +97,19 @@ const onReset = () => {
} }
} }
function openDialog(type) { function openDialog(type) {
dialogFormVisible.value = true
// let params = {} // let params = {}
switch (type) { switch (type) {
case 'add': case 'add':
dialogTitle.value = '新增医院' dialogTitle.value = '新增医院'
form.value = {} // form.value = {}
break break
case 'edit': case 'edit':
// params.question_id = question_id.value // params.question_id = question_id.value
dialogTitle.value = '编辑医院信息' dialogTitle.value = '编辑医院信息'
break break
} }
dialogFormVisible.value = true
// router.push({name:'addCourse',params}) // router.push({name:'addCourse',params})
} }
async function onDelete() { async function onDelete() {
@ -172,9 +174,9 @@ function closeDialog() {
form.value = {} form.value = {}
} }
async function enterDialog() { // async function enterDialog() { //
// form.value.score = parseInt(form.value.score) await apiForm.value.validate(async(valid, fields) => {
// form.value.teacher_id = 0 if (valid) {
// form.value.question = JSON.stringify(question_form.value) console.log('submit!')
let func_name = 'addHospital' let func_name = 'addHospital'
if (form.value.ID) { // if (form.value.ID) { //
func_name = 'editHospital' func_name = 'editHospital'
@ -187,13 +189,13 @@ async function enterDialog() { // 提交
type: 'success', type: 'success',
message: res.msg message: res.msg
}) })
// if (tableData.value.length === ids.length && page.value > 1) {
// page.value--
// }
// deleteVisible.value = false
closeDialog()
getHospitalList() getHospitalList()
closeDialog()
} }
} else {
// console.log('error submit!', fields)
}
})
} }
function addRowFunc(type) { function addRowFunc(type) {
// { // {