古书选择

This commit is contained in:
徐哼唧L
2024-01-29 14:11:53 +08:00
parent ac5aa564b1
commit d833be0257
3 changed files with 37 additions and 9 deletions

View File

@@ -75,10 +75,18 @@
<el-radio :label="0">普通</el-radio>
<el-radio :label="1">中医经典</el-radio>
<el-radio :label="2">国学经典</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="古书" prop="relationId">
<el-select v-model="dataForm.relationId" filterable allow-create default-first-option
placeholder="请选择古书">
<el-option :key="0" label="无" :value="0"></el-option>
<el-option v-for="item in gushuList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-row>
<!-- <el-col :span="12">
<el-form-item label="原价" prop="price">
<el-input v-model="dataForm.price" placeholder="价格"></el-input>
@@ -234,6 +242,7 @@
dictType: '',
dictValue: ''
},
gushuList:[],
authorList: [],
restaurants: [],
author: '',
@@ -272,6 +281,7 @@
canListen: false,
clockIn: 2,
teachIn: 0,
relationId:0,
},
splitsTypeList: [],
dataRule: {
@@ -376,6 +386,7 @@
this.dataForm.clockIn = data.book.clockIn
this.dataForm.teachIn = data.book.teachIn
this.dataForm.canListen = data.book.canListen
this.dataForm.relationId = data.book.relationId
var checklist = data.book.type
var medicaldeschecklist = data.book.medicaldesBookType
var authorList = data.book.authorId
@@ -457,6 +468,7 @@
'novel': this.dataForm.novel,
'splits': this.dataForm.splits,
'canListen': this.dataForm.canListen,
'relationId': this.dataForm.relationId,
'clockIn': this.dataForm.clockIn,
'teachIn': this.dataForm.teachIn
})
@@ -512,6 +524,18 @@
}) => {
this.splitsTypeList = data.dataList
})
// 获取古书
this.$http({
url: this.$http.adornUrl('/book/book/getAncientBooks'),
method: 'post',
}).then(({
data
}) => {
this.gushuList= data.books
})
},
handleRemove(file) {
this.dataForm.images = '';

View File

@@ -371,7 +371,6 @@
}
imageslist = arr.join(";");
this.$http({
url: this.$http.adornUrl('/book/medicaldes/saveOrUpdateInherit'),
method: 'post',
@@ -396,6 +395,7 @@
this.$message.error("失败");
}
})
}
})
},

View File

@@ -36,9 +36,9 @@
</template>
</el-table-column>
<el-table-column label="排序" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.sort }}
</template>
<template slot-scope="scope">
{{ scope.row.sort }}
</template>
</el-table-column>
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
<template slot-scope="scope">
@@ -52,8 +52,8 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<el-dialog :visible.sync="addOrUpdateVisible" :close-on-click-modal="false" :append-to-body="true" :title="titlesub" width="50%"
@close="cancleClose">
<el-dialog :visible.sync="addOrUpdateVisible" :close-on-click-modal="false" :append-to-body="true" :title="titlesub"
width="50%" @close="cancleClose">
<el-form :inline="true" :model="addForm" ref="addFormRef" :rules="addFormRule" class="dialog-wmzg">
<el-row type="flex" justify="center">
<el-form-item label="分类" prop="type" label-width="100px">
@@ -220,7 +220,7 @@
if (val == 1) {
return '吴门之歌'
} else if (val == 2) {
return '巴山夜'
return '巴山夜'
} else {
return '吴门之徽'
}
@@ -242,6 +242,7 @@
},
// 新增 / 修改
editOrUpdateHandle(row) {
console.log(row)
this.titlesub = '修改'
// this.getbookname()
this.editId = row.id
@@ -256,7 +257,10 @@
}
var attr = []
attr.push(img)
this.fileList = attr
if (attr[0].url != '') {
this.fileList = attr
}
console.log('this.fileList', this.fileList);
this.addOrUpdateVisible = true