Commit 9daec549 by Lyan

bug修改

parent 573e8c49
...@@ -142,6 +142,11 @@ ...@@ -142,6 +142,11 @@
<el-button v-if="isAuth('manage:indexcarouselmanage:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button> <el-button v-if="isAuth('manage:indexcarouselmanage:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:indexcarouselmanage:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:indexcarouselmanage:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:indexcarouselmanage:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:indexcarouselmanage:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
<br v-if="scope.row.classnum=='大轮播'"/>
<el-button v-if="scope.row.classnum=='大轮播'" type="text" size="small" >
<span v-if="scope.row.isShow==1" @click="updateIsShow(scope.row.id,0)">了解更多隐藏</span>
<span v-if="scope.row.isShow==0" @click="updateIsShow(scope.row.id,1)">了解更多显示</span>
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -441,6 +446,41 @@ export default { ...@@ -441,6 +446,41 @@ export default {
this.$message.error(data.msg) this.$message.error(data.msg)
} }
}) })
},
updateIsShow (id, isShow) {
let str
if (isShow === 1) {
str = '显示'
} else {
str = '隐藏'
}
this.$confirm(`确定对[id=${id}]进行['了解更多${str}']操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/office/indexCarouselManage/updateIsShow'),
method: 'post',
data: this.$http.adornData({
'id': id,
'isShow': isShow
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
} }
} }
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
v-show="!showInfo" v-show="!showInfo"
v-model="dataForm.showtime" v-model="dataForm.showtime"
value-format='yyyy-MM-dd' value-format='yyyy-MM-dd'
type="datetime" type="date"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
<p v-show="showInfo">{{dataForm.showtime}}</p> <p v-show="showInfo">{{dataForm.showtime}}</p>
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
brief: '', brief: '',
author: '', author: '',
source: '', source: '',
levels: '', levels: '1',
directpath: '', directpath: '',
pic: '', pic: '',
content: '', content: '',
...@@ -120,18 +120,18 @@ export default { ...@@ -120,18 +120,18 @@ export default {
titleOld: [ titleOld: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
keyword: [ // keyword: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
// brief: [ // brief: [
// { required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
// ], // ],
author: [ // author: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
source: [ // source: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
levels: [ levels: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
v-show="!showInfo" v-show="!showInfo"
v-model="dataForm.showtime" v-model="dataForm.showtime"
value-format='yyyy-MM-dd' value-format='yyyy-MM-dd'
type="datetime" type="date"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
<p v-show="showInfo">{{dataForm.showtime}}</p> <p v-show="showInfo">{{dataForm.showtime}}</p>
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
brief: '', brief: '',
author: '', author: '',
source: '', source: '',
levels: '', levels: '1',
directpath: '', directpath: '',
pic: '', pic: '',
content: '', content: '',
...@@ -119,18 +119,18 @@ export default { ...@@ -119,18 +119,18 @@ export default {
titleOld: [ titleOld: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
keyword: [ // keyword: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
brief: [ brief: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
author: [ // author: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
source: [ // source: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
levels: [ levels: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
v-show="!showInfo" v-show="!showInfo"
v-model="dataForm.showtime" v-model="dataForm.showtime"
value-format='yyyy-MM-dd' value-format='yyyy-MM-dd'
type="datetime" type="date"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
<p v-show="showInfo">{{dataForm.showtime}}</p> <p v-show="showInfo">{{dataForm.showtime}}</p>
...@@ -120,18 +120,18 @@ export default { ...@@ -120,18 +120,18 @@ export default {
titleOld: [ titleOld: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
keyword: [ // keyword: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
// brief: [ // brief: [
// { required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
// ], // ],
author: [ // author: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
source: [ // source: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
levels: [ levels: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
...@@ -162,9 +162,6 @@ export default { ...@@ -162,9 +162,6 @@ export default {
title: '' title: ''
} }
}, },
created () {
},
methods: { methods: {
init (id, showInfo) { init (id, showInfo) {
this.dataForm.id = id || 0 this.dataForm.id = id || 0
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
v-show="!showInfo" v-show="!showInfo"
v-model="dataForm.showtime" v-model="dataForm.showtime"
value-format='yyyy-MM-dd' value-format='yyyy-MM-dd'
type="datetime" type="date"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
<p v-show="showInfo">{{dataForm.showtime}}</p> <p v-show="showInfo">{{dataForm.showtime}}</p>
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
brief: '', brief: '',
author: '', author: '',
source: '', source: '',
levels: '', levels: 1,
directpath: '', directpath: '',
pic: '', pic: '',
content: '', content: '',
...@@ -120,18 +120,18 @@ export default { ...@@ -120,18 +120,18 @@ export default {
titleOld: [ titleOld: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
keyword: [ // keyword: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
// brief: [ // brief: [
// { required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
// ], // ],
author: [ // author: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
source: [ // source: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
levels: [ levels: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
...@@ -196,10 +196,10 @@ export default { ...@@ -196,10 +196,10 @@ export default {
this.loading = true this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
if (this.dataForm.pic === '' || this.dataForm.pic === null) { // if (this.dataForm.pic === '' || this.dataForm.pic === null) {
this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
return // return
} // }
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/topicnews/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/topicnews/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post', method: 'post',
......
...@@ -133,18 +133,18 @@ export default { ...@@ -133,18 +133,18 @@ export default {
levels: [ levels: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
keyword: [ // keyword: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
// directpath: [ // directpath: [
// { required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
// ], // ],
author: [ // author: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
source: [ // source: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
// publicdate: [ // publicdate: [
// { required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
......
...@@ -198,36 +198,41 @@ ...@@ -198,36 +198,41 @@
//, emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹 //, emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
// 粘贴只保留标签,去除标签所有属性 // 粘贴只保留标签,去除标签所有属性
//, retainOnlyLabelPasted: false retainOnlyLabelPasted: true,
//, pasteplain:false //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴 pasteplain: true, // 是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
// 纯文本粘贴模式下的过滤规则 // 纯文本粘贴模式下的过滤规则
// 'filterTxtRules' : function(){ 'filterTxtRules': (function () {
// function transP(node){ function transP (node) {
// node.tagName = 'p'; node.tagName = 'p'
// node.setStyle(); node.setStyle()
// } }
// return { return {
// //直接删除及其字节点内容 // 直接删除及其字节点内容
// '-' : 'script style object iframe embed input select', '-': 'script style object iframe embed input select',
// 'p': {$:{}}, 'p': {$: {}},
// 'br':{$:{}}, 'br': {$: {}},
// 'div':{'$':{}}, 'div': {'$': {}},
// 'li':{'$':{}}, 'li': {'$': {}},
// 'caption':transP, 'caption': transP,
// 'th':transP, 'th': transP,
// 'tr':transP, 'tr': transP,
// 'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP, 'h1': transP,
// 'td':function(node){ 'h2': transP,
// //没有内容的td直接删掉 'h3': transP,
// var txt = !!node.innerText(); 'h4': transP,
// if(txt){ 'h5': transP,
// node.parentNode.insertAfter(UE.uNode.createText(' &nbsp; &nbsp;'),node); 'h6': transP,
// } 'td': function (node) {
// node.parentNode.removeChild(node,node.innerText()) // 没有内容的td直接删掉
// } var txt = !!node.innerText()
// } if (txt) {
// }() node.parentNode.insertAfter(UE.uNode.createText(' &nbsp; &nbsp;'), node)
}
node.parentNode.removeChild(node, node.innerText())
}
}
}()),
//, allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串 //, allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment