提交 14fed875 authored 作者: 方远's avatar 方远

更新

上级 7471cd12
......@@ -3,8 +3,8 @@ ENV = 'development'
# base api
# VUE_APP_BASE_API = '/dev-api'
# VUE_APP_BASE_API = 'http://117.78.43.107'
VUE_APP_BASE_API = 'http://192.168.2.35:8098'
VUE_APP_BASE_API = 'http://117.78.43.107'
# VUE_APP_BASE_API = 'http://192.168.2.35:8098'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
......
<template>
<div> <!-- 导入 -->
<el-dialog :title="title" :visible.sync="dialogImport" :close-on-click-modal="false" :before-close="close" @open="openDialog()" width="430px" class="importDialog">
<div class="importTip">操作提示:单次上传最多10个文件,全部上传完成前请勿关闭窗口,避免数据丢失!</div>
<div class="importTip">操作提示:全部上传完成前请勿关闭窗口,避免数据丢失!</div>
<el-upload
class="upload-demo"
ref="upload"
:accept="accept"
multiple
:limit="10"
:action="`${courseUrl}${action}`"
:on-preview="handlePreview"
:on-remove="handleRemove"
:file-list="fileList"
:on-exceed="handleExceed"
:on-success="handleSuccess"
:before-upload="beforeUpload">
<el-button type="primary" plain size="small">选择文件(可多选)</el-button>
......@@ -89,6 +87,7 @@ export default {
},
methods: {
getBookList(query){ //根据name获取关联图书列表
if(query=="") return;
getBookRelationAPI(query).then(res=>{
if(res.data.code == 0){
this.resourceBookList = res.data.data||[]
......
......@@ -47,7 +47,7 @@
<template slot-scope="scope">
<span class="lineBtn" @click="scope.row.isDisabled?editAddData(scope.$index):saveAddData()">{{scope.row.isDisabled?'编辑':'保存'}}</span>
<span class="lineBtn" @click="deleteLineTableItem(scope.row.id)">删除</span>
<span class="lineBtn" @click="editSortOption(scope.row.id)" v-if="currentColumnName == '集团领导'">修改排序</span>
<span class="lineBtn" @click="editSortOption(scope.row.id)">修改排序</span>
</template>
</el-table-column>
</el-table>
......
......@@ -112,6 +112,7 @@
@closePrice="dialogVisible = false"
@changePrice="editPrice"
></edit-price> -->
<div class="qrCodeDetail2" id="qrCodeDetail2" ref="qrcode2"></div>
</el-card>
</div>
......@@ -240,6 +241,7 @@ export default {
'recommendLine': () => { this.goRecommend(id)}, //推荐内容
'createZipLine': () => { this.updateZip(id);}, //生成二维码
'deleteZipLine': () => { this.deleteZip(id);}, //删除二维码
'downloadQrcodeLine': () => { this.downloadQrcode(id,obj);}, //下载二维码
}
status[btnName]()
},
......@@ -390,6 +392,30 @@ export default {
closeCode () {
this.$refs.qrcode.innerHTML = ''
},
downloadQrcode(id,item){ //生成二维码
this.$refs.qrcode2.innerHTML = ''
setTimeout(() => {
let qr0 = new QRCode('qrCodeDetail2', {
text: this.baseUrl + '/h5/special/index?id=' + id,
width: 124,
height: 124,
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H
})
this.savePic(item)
},0)
},
savePic(item) { //下载二维码
let qrCodeCanvas = document
.getElementById("qrCodeDetail2")
.getElementsByTagName("canvas");
let a = document.createElement("a");
a.href = qrCodeCanvas[0].toDataURL("image/url");
a.download = `${item.name}.png`;
a.click();
this.$refs.qrcode2.innerHTML = ''
},
removeData(id) {//删除数据
let arr = [], tipText = ''
......@@ -469,4 +495,10 @@ export default {
height: 124px;
margin: 0 auto 16px;
}
.qrCodeDetail2{
width: 124px;
height: 124px;
margin: 0 auto 16px;
display: none;
}
</style>
\ No newline at end of file
......@@ -346,6 +346,7 @@ export default {
}
},
getBookList(query){ //根据name获取关联图书列表
if(query=="") return;
getBookRelationAPI(query).then(res=>{
if(res.data.code == 0){
this.resourceBookList = res.data.data||[]
......
......@@ -314,6 +314,7 @@ export default {
})
},
getBookList(query){ //根据name获取关联图书列表
if(query=="") return;
getBookRelationAPI(query).then(res=>{
if(res.data.code == 0){
this.resourceBookList = res.data.data||[]
......
......@@ -145,7 +145,7 @@ export default {
priceOption: '1',
realPrice: null,
diyTypeCode: [],
bookList: [],
bookList: {},
},
translatorList:[],
labelQuery: {
......
......@@ -103,6 +103,9 @@
<div class="Ueditor" v-if="tabId == 6">
<vue-ueditor-wrap :config="configMsg" v-model="dataForm.editRecommendation"></vue-ueditor-wrap>
</div>
<div class="Ueditor" v-if="tabId == 7">
<vue-ueditor-wrap :config="configMsg" v-model="dataForm.others"></vue-ueditor-wrap>
</div>
<!-- <div class="Ueditor" v-if="tabId == 7">
<vue-ueditor-wrap :config="configMsg" v-model="dataForm.digest"></vue-ueditor-wrap>
</div> -->
......@@ -245,6 +248,7 @@ export default {
'4': '作者介绍',
'5': '商品推荐',
'6': '编辑推荐',
'7': '其他内容',
// '7': '精彩书摘'
},
tabId: 1,
......@@ -731,7 +735,7 @@ export default {
border-radius: 3px 3px 0px 0px;
box-sizing: border-box;
.tab{
width: 118px;
width: 114px;
display: inline-block;
color: #3F4560;
text-align: center;
......
......@@ -349,6 +349,7 @@ export default {
},
getBookList(query){ //根据name获取关联图书列表
if(query=="") return;
getBookRelationAPI(query).then(res=>{
if(res.data.code == 0){
this.resourceBookList = res.data.data||[]
......
......@@ -196,7 +196,8 @@ export default {
if(this.isExist(this.chooiceList)){//至少选中一条
confirm.apply(this,['确定批量取消选择的数据吗?']).then(() => {
this.updateRelationForm.ids = getSelectionIds(this.chooiceList)
this.updateRelationForm.resourceIds = [this.$route.query.id]
this.updateRelationForm.resourceIds = getSelectionIds(this.chooiceList,"resourceId")
this.updateRelationForm.bookId = this.$route.query.id
authorRecDelAPI(this.updateRelationForm).then(res =>{
if (res.data.code === 0) {
this.$message.success('批量取消成功');
......
......@@ -132,7 +132,8 @@ export default {
let data = {
resourceIds,
id: this.$route.query.id,
resourceType: this.listQuery.resourceType
resourceType: this.listQuery.resourceType,
type: this.type,
}
authorSaveRecAPI(data).then(res =>{
if (res.data.code === 0) {
......
......@@ -148,7 +148,7 @@ export default {
priceOption: '1',
realPrice: null,
diyTypeCode: [],
bookList: [],
bookList: {},
},
labelQuery: {
dataType: 5,
......@@ -295,6 +295,7 @@ export default {
})
},
getBookList(query){ //根据name获取关联图书列表
if(query=="") return;
getBookRelationAPI(query).then(res=>{
if(res.data.code == 0){
this.resourceBookList = res.data.data||[]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论