Commit 9daec549 by Lyan

bug修改

parent 573e8c49
......@@ -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: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>
<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>
</el-table-column>
</el-table>
......@@ -441,6 +446,41 @@ export default {
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 @@
v-show="!showInfo"
v-model="dataForm.showtime"
value-format='yyyy-MM-dd'
type="datetime"
type="date"
placeholder="选择日期">
</el-date-picker>
<p v-show="showInfo">{{dataForm.showtime}}</p>
......@@ -106,7 +106,7 @@ export default {
brief: '',
author: '',
source: '',
levels: '',
levels: '1',
directpath: '',
pic: '',
content: '',
......@@ -120,18 +120,18 @@ export default {
titleOld: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
keyword: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// keyword: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// brief: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
author: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
source: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// author: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// source: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
......
......@@ -32,7 +32,7 @@
v-show="!showInfo"
v-model="dataForm.showtime"
value-format='yyyy-MM-dd'
type="datetime"
type="date"
placeholder="选择日期">
</el-date-picker>
<p v-show="showInfo">{{dataForm.showtime}}</p>
......@@ -106,7 +106,7 @@ export default {
brief: '',
author: '',
source: '',
levels: '',
levels: '1',
directpath: '',
pic: '',
content: '',
......@@ -119,18 +119,18 @@ export default {
titleOld: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
keyword: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// keyword: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
brief: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
author: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
source: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// author: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// source: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
......
......@@ -32,7 +32,7 @@
v-show="!showInfo"
v-model="dataForm.showtime"
value-format='yyyy-MM-dd'
type="datetime"
type="date"
placeholder="选择日期">
</el-date-picker>
<p v-show="showInfo">{{dataForm.showtime}}</p>
......@@ -120,18 +120,18 @@ export default {
titleOld: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
keyword: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// keyword: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// brief: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
author: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
source: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// author: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// source: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
......@@ -162,9 +162,6 @@ export default {
title: ''
}
},
created () {
},
methods: {
init (id, showInfo) {
this.dataForm.id = id || 0
......
......@@ -32,7 +32,7 @@
v-show="!showInfo"
v-model="dataForm.showtime"
value-format='yyyy-MM-dd'
type="datetime"
type="date"
placeholder="选择日期">
</el-date-picker>
<p v-show="showInfo">{{dataForm.showtime}}</p>
......@@ -106,7 +106,7 @@ export default {
brief: '',
author: '',
source: '',
levels: '',
levels: 1,
directpath: '',
pic: '',
content: '',
......@@ -120,18 +120,18 @@ export default {
titleOld: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
keyword: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// keyword: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// brief: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
author: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
source: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// author: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// source: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
......@@ -196,10 +196,10 @@ export default {
this.loading = true
this.$refs['dataForm'].validate((valid) => {
if (valid) {
if (this.dataForm.pic === '' || this.dataForm.pic === null) {
this.$message.error('图片未上传,请上传图片!')
return
}
// if (this.dataForm.pic === '' || this.dataForm.pic === null) {
// this.$message.error('图片未上传,请上传图片!')
// return
// }
this.$http({
url: this.$http.adornUrl(`/office/topicnews/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post',
......
......@@ -133,18 +133,18 @@ export default {
levels: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
keyword: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// keyword: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// directpath: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
author: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
source: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
// author: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// source: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// publicdate: [
// { required: true, message: '不能为空', trigger: 'blur' }
......
......@@ -198,36 +198,41 @@
//, emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
// 粘贴只保留标签,去除标签所有属性
//, retainOnlyLabelPasted: false
retainOnlyLabelPasted: true,
//, pasteplain:false //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
pasteplain: true, // 是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
// 纯文本粘贴模式下的过滤规则
// 'filterTxtRules' : function(){
// function transP(node){
// node.tagName = 'p';
// node.setStyle();
// }
// return {
// //直接删除及其字节点内容
// '-' : 'script style object iframe embed input select',
// 'p': {$:{}},
// 'br':{$:{}},
// 'div':{'$':{}},
// 'li':{'$':{}},
// 'caption':transP,
// 'th':transP,
// 'tr':transP,
// 'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP,
// 'td':function(node){
// //没有内容的td直接删掉
// var txt = !!node.innerText();
// if(txt){
// node.parentNode.insertAfter(UE.uNode.createText(' &nbsp; &nbsp;'),node);
// }
// node.parentNode.removeChild(node,node.innerText())
// }
// }
// }()
'filterTxtRules': (function () {
function transP (node) {
node.tagName = 'p'
node.setStyle()
}
return {
// 直接删除及其字节点内容
'-': 'script style object iframe embed input select',
'p': {$: {}},
'br': {$: {}},
'div': {'$': {}},
'li': {'$': {}},
'caption': transP,
'th': transP,
'tr': transP,
'h1': transP,
'h2': transP,
'h3': transP,
'h4': transP,
'h5': transP,
'h6': transP,
'td': function (node) {
// 没有内容的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字符串
......
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