查询翻页
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<el-input v-model="query.authorName" placeholder="作者姓名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button @click="pageIndex = 1;getDataList()">查询</el-button>
|
||||
<el-button v-if="isAuth('book:book:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<!-- <el-button v-if="isAuth('book:book:delete')" type="danger" @click="deleteHandle()"
|
||||
:disabled="dataListSelections.length <= 0">批量删除</el-button> -->
|
||||
|
||||
@@ -31,11 +31,12 @@
|
||||
<el-input type="textarea" rows="4" v-model="dataForm.bookdesc"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="医案内容" prop="contents">
|
||||
<el-upload class="avatar-uploader" :action="baseUrl + '/oss/fileoss'" accept=".jpeg,.jpg,.gif,.png" :show-file-list="false" :on-success="contentUploadSuccess" >
|
||||
<el-upload class="avatar-uploader" :action="baseUrl + '/oss/fileoss'" accept=".jpeg,.jpg,.gif,.png"
|
||||
:show-file-list="false" :on-success="contentUploadSuccess">
|
||||
</el-upload>
|
||||
<quill-editor v-model="dataForm.contents" ref="myQuillEditor" :options="editorOption"
|
||||
@blur="onEditorBlur($event)" @focus="onEditorFocus($event)"
|
||||
@ready="onEditorReady($event)" class="shangpin_editor">
|
||||
@blur="onEditorBlur($event)" @focus="onEditorFocus($event)" @ready="onEditorReady($event)"
|
||||
class="shangpin_editor">
|
||||
</quill-editor>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
@@ -50,33 +51,65 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {quillEditor} from 'vue-quill-editor'
|
||||
import {
|
||||
quillEditor
|
||||
} from 'vue-quill-editor'
|
||||
import global from '../../common/common.vue' //引入共用组间
|
||||
|
||||
import 'quill/dist/quill.core.css'
|
||||
import 'quill/dist/quill.snow.css'
|
||||
import 'quill/dist/quill.bubble.css'
|
||||
import ImageResize from 'quill-image-resize-module' // 调整大小组件。
|
||||
import 'quill/dist/quill.bubble.css'
|
||||
import ImageResize from 'quill-image-resize-module' // 调整大小组件。
|
||||
// import { ImageDrop } from 'quill-image-drop-module'; // 拖动加载图片组件。
|
||||
Quill.register('modules/imageResize', ImageResize );
|
||||
Quill.register('modules/imageResize', ImageResize);
|
||||
// Quill.register('modules/imageDrop', ImageDrop);
|
||||
|
||||
const toolbarOptions = [
|
||||
['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线
|
||||
['blockquote', 'code-block'], //引用,代码块
|
||||
[{ 'header': 1 }, { 'header': 2 }], // 几级标题
|
||||
[{ 'list': 'ordered' }, { 'list': 'bullet' }], // 有序列表,无序列表
|
||||
[{ 'script': 'sub' }, { 'script': 'super' }], // 下角标,上角标
|
||||
[{ 'indent': '-1' }, { 'indent': '+1' }], // 缩进
|
||||
[{ 'direction': 'rtl' }], // 文字输入方向
|
||||
[{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
|
||||
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],// 标题
|
||||
[{ 'color': [] }, { 'background': [] }], // 颜色选择
|
||||
[{ 'font': ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial'] }],// 字体
|
||||
[{ 'align': [] }], // 居中
|
||||
['clean'], // 清除样式,
|
||||
['link', 'image'], // 上传图片、上传视频
|
||||
]
|
||||
['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线
|
||||
['blockquote', 'code-block'], //引用,代码块
|
||||
[{
|
||||
'header': 1
|
||||
}, {
|
||||
'header': 2
|
||||
}], // 几级标题
|
||||
[{
|
||||
'list': 'ordered'
|
||||
}, {
|
||||
'list': 'bullet'
|
||||
}], // 有序列表,无序列表
|
||||
[{
|
||||
'script': 'sub'
|
||||
}, {
|
||||
'script': 'super'
|
||||
}], // 下角标,上角标
|
||||
[{
|
||||
'indent': '-1'
|
||||
}, {
|
||||
'indent': '+1'
|
||||
}], // 缩进
|
||||
[{
|
||||
'direction': 'rtl'
|
||||
}], // 文字输入方向
|
||||
[{
|
||||
'size': ['small', false, 'large', 'huge']
|
||||
}], // 字体大小
|
||||
[{
|
||||
'header': [1, 2, 3, 4, 5, 6, false]
|
||||
}], // 标题
|
||||
[{
|
||||
'color': []
|
||||
}, {
|
||||
'background': []
|
||||
}], // 颜色选择
|
||||
[{
|
||||
'font': ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial']
|
||||
}], // 字体
|
||||
[{
|
||||
'align': []
|
||||
}], // 居中
|
||||
['clean'], // 清除样式,
|
||||
['link', 'image'], // 上传图片、上传视频
|
||||
]
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -104,8 +137,8 @@ import 'quill/dist/quill.bubble.css'
|
||||
noneBtnImg: false,
|
||||
title: '',
|
||||
productImages: '',
|
||||
bookdesc:'',
|
||||
yianid:null,
|
||||
bookdesc: '',
|
||||
yianid: null,
|
||||
sort: null,
|
||||
},
|
||||
|
||||
@@ -131,10 +164,19 @@ import 'quill/dist/quill.bubble.css'
|
||||
maxStack: 50,
|
||||
userOnly: false
|
||||
},
|
||||
imageResize: {
|
||||
displayStyles: {
|
||||
backgroundColor: 'black',
|
||||
border: 'none',
|
||||
color: 'white'
|
||||
},
|
||||
modules: ['Resize', 'DisplaySize']
|
||||
// modules: ['Resize', 'DisplaySize', 'Toolbar']
|
||||
},
|
||||
toolbar: {
|
||||
container: toolbarOptions,
|
||||
handlers: {
|
||||
image: function (value) {
|
||||
image: function(value) {
|
||||
if (value) {
|
||||
// 调用element的图片上传组件
|
||||
document.querySelector('.avatar-uploader input').click()
|
||||
@@ -144,14 +186,6 @@ import 'quill/dist/quill.bubble.css'
|
||||
}
|
||||
}
|
||||
},
|
||||
imageResize: {
|
||||
displayStyles: {
|
||||
backgroundColor: 'black',
|
||||
border: 'none',
|
||||
color: 'white'
|
||||
},
|
||||
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
|
||||
}
|
||||
},
|
||||
// modules: {
|
||||
// toolbar: [
|
||||
@@ -206,42 +240,42 @@ import 'quill/dist/quill.bubble.css'
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
init(id, bookId) {
|
||||
id ? '' : id=0
|
||||
this.dataForm.yianid = id || null
|
||||
this.dataForm.bookId = bookId || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.bookId) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/book/bookMedicalRecords/getById?medicalRecordsId='+ id),
|
||||
method: 'post',
|
||||
// params: this.$http.adornParams()
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
// console.log(data,666)
|
||||
if (data && data.code === 0 && data.entity != null) {
|
||||
this.dataForm.bookId = data.entity.bookId
|
||||
this.dataForm.title = data.entity.title
|
||||
this.dataForm.contents = data.entity.content
|
||||
this.dataForm.medicalRecordsId = data.entity.medicalRecordsId
|
||||
this.dataForm.sort = data.entity.sort
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
init(id, bookId) {
|
||||
id ? '' : id = 0
|
||||
this.dataForm.yianid = id || null
|
||||
this.dataForm.bookId = bookId || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.bookId) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/book/bookMedicalRecords/getById?medicalRecordsId=' + id),
|
||||
method: 'post',
|
||||
// params: this.$http.adornParams()
|
||||
}).then(({
|
||||
data
|
||||
}) => {
|
||||
// console.log(data,666)
|
||||
if (data && data.code === 0 && data.entity != null) {
|
||||
this.dataForm.bookId = data.entity.bookId
|
||||
this.dataForm.title = data.entity.title
|
||||
this.dataForm.contents = data.entity.content
|
||||
this.dataForm.medicalRecordsId = data.entity.medicalRecordsId
|
||||
this.dataForm.sort = data.entity.sort
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
dealImgChange(file, fileList) {
|
||||
this.dataForm.noneBtnImg = fileList.length >= this.dataForm.limitCountImg;
|
||||
},
|
||||
dealImgChange(file, fileList) {
|
||||
this.dataForm.noneBtnImg = fileList.length >= this.dataForm.limitCountImg;
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
// console.log('userid', this.$store.state.user.id)
|
||||
dataFormSubmit() {
|
||||
// console.log('userid', this.$store.state.user.id)
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
@@ -282,7 +316,7 @@ import 'quill/dist/quill.bubble.css'
|
||||
},
|
||||
changeTime(e) {
|
||||
console.log(e)
|
||||
},
|
||||
},
|
||||
|
||||
handlePictureCardPreview(file) {
|
||||
this.dataForm.productImages = file.url;
|
||||
@@ -296,7 +330,7 @@ import 'quill/dist/quill.bubble.css'
|
||||
url: res.url
|
||||
})
|
||||
this.dataForm.productImages = res.url
|
||||
console.log(this.swiperfileList,this.dataForm.productImages)
|
||||
console.log(this.swiperfileList, this.dataForm.productImages)
|
||||
this.$message.success("上传成功");
|
||||
} else {
|
||||
this.$message.error("上传失败");
|
||||
@@ -310,24 +344,24 @@ import 'quill/dist/quill.bubble.css'
|
||||
} else {
|
||||
return arr.toString()
|
||||
}
|
||||
},
|
||||
contentUploadSuccess(res, file) {
|
||||
// console.log(res)
|
||||
let quill = this.$refs.myQuillEditor.quill
|
||||
// 如果上传成功
|
||||
if (res) {
|
||||
// 获取光标所在位置
|
||||
let length = quill.getSelection().index;
|
||||
// 插入图片,res为服务器返回的图片链接地址
|
||||
quill.insertEmbed(length, 'image', res.url)
|
||||
// 调整光标到最后
|
||||
quill.setSelection(length + 1)
|
||||
} else {
|
||||
// 提示信息,需引入Message
|
||||
this.$message.error('图片插入失败!')
|
||||
}
|
||||
},
|
||||
contentUploadSuccess(res, file) {
|
||||
// console.log(res)
|
||||
let quill = this.$refs.myQuillEditor.quill
|
||||
// 如果上传成功
|
||||
if (res) {
|
||||
// 获取光标所在位置
|
||||
let length = quill.getSelection().index;
|
||||
// 插入图片,res为服务器返回的图片链接地址
|
||||
quill.insertEmbed(length, 'image', res.url)
|
||||
// 调整光标到最后
|
||||
quill.setSelection(length + 1)
|
||||
} else {
|
||||
// 提示信息,需引入Message
|
||||
this.$message.error('图片插入失败!')
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
handlePicSuccess(res, file) {
|
||||
// console.log(res,'res')
|
||||
if (res.msg == "success") {
|
||||
@@ -337,7 +371,7 @@ import 'quill/dist/quill.bubble.css'
|
||||
url: res.url
|
||||
})
|
||||
this.dataForm.productImages = res.url
|
||||
console.log(this.dataForm.productImages,'productImages')
|
||||
console.log(this.dataForm.productImages, 'productImages')
|
||||
this.$message.success("上传成功");
|
||||
} else {
|
||||
this.$message.error("上传失败");
|
||||
@@ -359,7 +393,7 @@ import 'quill/dist/quill.bubble.css'
|
||||
},
|
||||
// 失去焦点事件
|
||||
onEditorBlur(quill) {
|
||||
console.log('editor blur!', quill)
|
||||
console.log('editor blur!', quill)
|
||||
},
|
||||
// 获得焦点事件
|
||||
onEditorFocus(quill) {
|
||||
@@ -367,16 +401,16 @@ import 'quill/dist/quill.bubble.css'
|
||||
},
|
||||
// 准备富文本编辑器
|
||||
onEditorReady(quill) {
|
||||
// console.log('editor ready!', quill)
|
||||
// console.log('editor ready!', quill)
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
// this.$bus.$on("haveBookIds", (data) => {
|
||||
// // console.log('haveBookIds', data)
|
||||
// data.bookIds.length > 0 ? this.dataForm.Books = data.bookIds : this.dataForm.Books = []
|
||||
// });
|
||||
},
|
||||
mounted() {
|
||||
// this.$bus.$on("haveBookIds", (data) => {
|
||||
// // console.log('haveBookIds', data)
|
||||
// data.bookIds.length > 0 ? this.dataForm.Books = data.bookIds : this.dataForm.Books = []
|
||||
// });
|
||||
},
|
||||
|
||||
watch: {
|
||||
visible: {
|
||||
@@ -404,7 +438,7 @@ import 'quill/dist/quill.bubble.css'
|
||||
// }
|
||||
|
||||
.el-uploadfeng {
|
||||
.el-upload-list__item {
|
||||
.el-upload-list__item {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button @click="pageIndex = 1;getDataList()">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="buttonGroup">
|
||||
|
||||
@@ -147,8 +147,8 @@ export default {
|
||||
radio3: 'general',
|
||||
checkedList: [],
|
||||
ruleForm: {
|
||||
deliverLcd: '',
|
||||
dictValue:''
|
||||
deliverLcd: 'SF',
|
||||
dictValue:'顺丰快递'
|
||||
},
|
||||
expressList: [],
|
||||
rules: {
|
||||
@@ -169,6 +169,8 @@ export default {
|
||||
tabChange(e){
|
||||
// console.log('变化了')
|
||||
this.$refs['ruleForm'].clearValidate()
|
||||
this.ruleForm.deliverLcd="SF"
|
||||
this.ruleForm.dictValue="顺丰快递"
|
||||
},
|
||||
// 获取快递公司列表
|
||||
getExpressList() {
|
||||
@@ -179,6 +181,7 @@ export default {
|
||||
}).then(({ data }) => {
|
||||
// console.log(data, '快递列表')
|
||||
this.expressList = data.result
|
||||
|
||||
}).catch(({ e }) => {
|
||||
console.log(e,'e')
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button @click="pageIndex = 1;getDataList()">查询</el-button>
|
||||
<el-button v-if="isAuth('book:paypaymentorder:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button v-if="isAuth('book:paypaymentorder:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||
</el-form-item>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button @click="pageIndex = 1;getDataList()">查询</el-button>
|
||||
<el-button v-if="isAuth('book:transactiondetails:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button v-if="isAuth('book:transactiondetails:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||
</el-form-item>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button @click="pageIndex = 1;getDataList()">查询</el-button>
|
||||
<el-button v-if="isAuth('book:shopproduct:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button v-if="isAuth('book:shopproduct:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||
</el-form-item>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button @click="pageIndex = 1;getDataList()">查询</el-button>
|
||||
<el-button v-if="isAuth('book:user:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button v-if="isAuth('book:user:delete')" type="danger" @click="deleteHandle()"
|
||||
:disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
// api接口请求地址
|
||||
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.100:9200/pb';
|
||||
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
|
||||
// window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境
|
||||
window.SITE_CONFIG['baseUrl'] = 'https://testapi.nuttyreading.com'; // 线上测试环境
|
||||
// window.SITE_CONFIG['baseUrl'] = 'https://api.nuttyreading.com'; // 线上正式环境
|
||||
window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';
|
||||
// window.SITE_CONFIG['baseUrl'] = 'http://192.168.110.110:9200/pb';
|
||||
// window.SITE_CONFIG['baseUrl'] = 'http://59.110.212.44:9200/pb';
|
||||
|
||||
// cdn地址 = 域名 + 版本号
|
||||
|
||||
Reference in New Issue
Block a user