Commit 4d19c97a by Lyan

后台bug更改

parent 6faec595
...@@ -376,7 +376,7 @@ img { ...@@ -376,7 +376,7 @@ img {
.avatar-uploaderFile>.el-upload { .avatar-uploaderFile>.el-upload {
border:none border:none
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover{
border-color: #409EFF; border-color: #409EFF;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
...@@ -386,6 +386,9 @@ img { ...@@ -386,6 +386,9 @@ img {
height: 64px; height: 64px;
line-height: 64px; line-height: 64px;
text-align: center; text-align: center;
&:hover{
color: #409EFF;
}
} }
.avatar { .avatar {
...@@ -393,6 +396,9 @@ img { ...@@ -393,6 +396,9 @@ img {
height: 64px; height: 64px;
display: block; display: block;
} }
.avatar2{
width: 70%;
}
p{ p{
margin: 0; margin: 0;
} }
......
...@@ -13,17 +13,7 @@ ...@@ -13,17 +13,7 @@
} }
}, },
created () { created () {
this.$http({
url: this.$http.adornUrl('/office/domain/api/list'),
method: 'get'
}).then(({data}) => {
if (data && data.code === 0) {
this.$store.commit('config/updateUrls', data.data)
console.log(this.$store.state.config.urls)
} else {
this.$message.error(data.msg)
}
}).catch(() => {})
} }
} }
</script> </script>
......
...@@ -79,6 +79,19 @@ ...@@ -79,6 +79,19 @@
} }
}, },
created () {
this.$http({
url: this.$http.adornUrl('/office/domain/api/list'),
method: 'get'
}).then(({data}) => {
if (data && data.code === 0) {
this.$store.commit('config/updateUrls', data.data)
console.log(this.$store.state.config.urls)
} else {
this.$message.error(data.msg)
}
}).catch(() => {})
},
mounted () { mounted () {
console.log(this.mainTabs) console.log(this.mainTabs)
console.log(this.mainTabsActiveName) console.log(this.mainTabsActiveName)
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
label: '中心公告' label: '中心公告'
}, },
{ {
value: 2, value: 3,
label: '地方公告' label: '地方公告'
} }
], ],
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<el-button v-if="isAuth('manage:announce:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:announce:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:announce:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:announce:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:announce:check')" /> <br v-if="isAuth('manage:announce:check')" />
<el-button v-if="isAuth('manage:announce:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:announce:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:announce:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:announce:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:announce:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:announce:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
addOrUpdateVisible: false, addOrUpdateVisible: false,
dataForm: { dataForm: {
'title': '', 'title': '',
'levels': '0', 'levels': null,
'editor': '', 'editor': '',
'keyword': '', 'keyword': '',
'status': '', 'status': '',
...@@ -273,7 +273,15 @@ ...@@ -273,7 +273,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/NoticeArticle?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<el-form-item label="背景颜色:" prop="colorBackground" class=" setdes setdes1"> <el-form-item label="背景颜色:" prop="colorBackground" class=" setdes setdes1">
<el-row v-show="!showInfo"> <el-row v-show="!showInfo">
<el-col :span="22"> <el-col :span="22">
<el-select v-model="dataForm.colorBackground" placeholder="请选择背景颜色" v-show="!showInfo"> <el-select v-model="dataForm.colorBackground" placeholder="请选择背景颜色" v-show="!showInfo" :disabled='disabled'>
<el-option <el-option
v-for="item in colorBackgroundList" v-for="item in colorBackgroundList"
:key="item.label" :key="item.label"
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<el-form-item label="按钮跳转色:" prop="colorMore" class="setdes setdes1"> <el-form-item label="按钮跳转色:" prop="colorMore" class="setdes setdes1">
<el-row v-show="!showInfo"> <el-row v-show="!showInfo">
<el-col :span="22"> <el-col :span="22">
<el-select v-model="dataForm.colorMore" placeholder="请选择背景颜色" v-show="!showInfo"> <el-select v-model="dataForm.colorMore" placeholder="请选择背景颜色" v-show="!showInfo" :disabled='disabled'>
<el-option <el-option
v-for="item in colorMoreList" v-for="item in colorMoreList"
:key="item.label" :key="item.label"
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<p v-show="showInfo">{{dataForm.colorMore}}</p> <p v-show="showInfo">{{dataForm.colorMore}}</p>
</el-form-item> </el-form-item>
<el-form-item label="类型:" prop="classnum"> <el-form-item label="类型:" prop="classnum">
<el-select v-model="dataForm.classnum" placeholder="请选择类别" v-show="!showInfo"> <el-select v-model="dataForm.classnum" placeholder="请选择类别" v-show="!showInfo" @change="getLunbo">
<el-option <el-option
v-for="item in classnumList" v-for="item in classnumList"
:key="item.label" :key="item.label"
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<el-form-item label="轮播简介:" prop="brief" class="setdes setdes1"> <el-form-item label="轮播简介:" prop="brief" class="setdes setdes1">
<el-row v-show="!showInfo"> <el-row v-show="!showInfo">
<el-col :span="22"> <el-col :span="22">
<el-input type="textarea" rows="5" v-model="dataForm.brief" placeholder="请输入简介" v-show="!showInfo"></el-input> <el-input type="textarea" rows="5" v-model="dataForm.brief" placeholder="请输入简介" v-show="!showInfo" :disabled='disabled'></el-input>
</el-col> </el-col>
<el-col :span="2" class="iconStyle"> <el-col :span="2" class="iconStyle">
<el-tooltip placement="top" effect="light"> <el-tooltip placement="top" effect="light">
...@@ -105,17 +105,17 @@ ...@@ -105,17 +105,17 @@
<el-form-item label="图片:" prop="picIndexPath" class="setdes setdes3"> <el-form-item label="图片:" prop="picIndexPath" class="setdes setdes3">
<el-upload <el-upload
v-show="!showInfo" v-show="!showInfo"
class="avatar-uploader" class="avatar-uploader avatar2"
action="" action=""
:show-file-list="false" :show-file-list="false"
:http-request="Upload" :http-request="Upload"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar"> <img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<!-- <el-input v-model="dataForm.picIndexPath" placeholder=""></el-input> --> <!-- <el-input v-model="dataForm.picIndexPath" placeholder=""></el-input> -->
<span v-show="!showInfo" style="font-size:12px;color:red">图片尺寸大轮播600X400px 小轮播360x160px</span> <span v-show="!showInfo" style="font-size:12px;color:red">图片尺寸大轮播600X400px 小轮播360x160px</span>
<p><img :src="imgUrlStr" class="avatar" v-show="showInfo"></p> <p><img :src="imgUrlStr" class="avatar2" v-show="showInfo"></p>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer" v-show="!showInfo"> <span slot="footer" class="dialog-footer" v-show="!showInfo">
...@@ -151,9 +151,9 @@ ...@@ -151,9 +151,9 @@
title: [ title: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
brief: [ // brief: [
{ required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
], // ],
levels: [ levels: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
], ],
...@@ -162,13 +162,13 @@ ...@@ -162,13 +162,13 @@
], ],
picIndexPath: [ picIndexPath: [
{ required: true, message: '不能为空', trigger: 'blur' } { required: true, message: '不能为空', trigger: 'blur' }
],
colorBackground: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
colorMore: [
{ required: true, message: '不能为空', trigger: 'blur' }
] ]
// colorBackground: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
// colorMore: [
// { required: true, message: '不能为空', trigger: 'blur' }
// ]
}, },
imgUrl: new FormData(), imgUrl: new FormData(),
imgUrlStr: '', imgUrlStr: '',
...@@ -197,7 +197,8 @@ ...@@ -197,7 +197,8 @@
{ {
label: '小轮播' label: '小轮播'
} }
] ],
disabled: false
} }
}, },
mounted () { mounted () {
...@@ -238,6 +239,13 @@ ...@@ -238,6 +239,13 @@
} }
}) })
}, },
getLunbo (e) {
if (e === '大轮播') {
this.disabled = false
} else if (e === '小轮播') {
this.disabled = true
}
},
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true this.loading = true
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<el-button v-if="isAuth('manage:indexcarouselmanage:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:indexcarouselmanage:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:indexcarouselmanage:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:indexcarouselmanage:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:indexcarouselmanage:check')"/> <br v-if="isAuth('manage:indexcarouselmanage:check')"/>
<el-button v-if="isAuth('manage:indexcarouselmanage:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</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>
</template> </template>
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
addOrUpdateVisible: false, addOrUpdateVisible: false,
dataForm: { dataForm: {
title: '', title: '',
levels: '0', levels: null,
status: '', status: '',
classnum: '', classnum: '',
inputdate: '' inputdate: ''
...@@ -262,8 +262,14 @@ ...@@ -262,8 +262,14 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (id) { showMsg (data) {
window.open(this.urls + '/News/msg?id=' + id, '_blank') if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<el-form-item label="栏目:" prop="classid"> <el-form-item label="栏目:" prop="classid">
<el-select v-model="dataForm.classid" @change="getClassList([dataForm.classid])" style='width:121px!important' v-show="!showInfo"> <el-select v-model="dataForm.classid" @change="getClassList([dataForm.classid])" style='width:121px!important' v-show="!showInfo">
<el-option <el-option
ref = 'sel1'
v-for="item in classidList" v-for="item in classidList"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
...@@ -34,13 +35,14 @@ ...@@ -34,13 +35,14 @@
</el-select> </el-select>
<el-select v-model="dataForm.cclassid" style='width:121px!important' v-show="!showInfo"> <el-select v-model="dataForm.cclassid" style='width:121px!important' v-show="!showInfo">
<el-option <el-option
ref = 'sel2'
v-for="item in cclassidList" v-for="item in cclassidList"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<p v-show="showInfo">{{className+'/'+cclassName}}</p> <p v-show="showInfo">{{dataForm.className+'/'+dataForm.cclassName}}</p>
</el-form-item> </el-form-item>
<el-form-item label='级别:' prop='levels'> <el-form-item label='级别:' prop='levels'>
<el-select v-model="dataForm.levels" placeholder="请输入级别" v-show="!showInfo"> <el-select v-model="dataForm.levels" placeholder="请输入级别" v-show="!showInfo">
...@@ -228,8 +230,11 @@ ...@@ -228,8 +230,11 @@
this.loading = false this.loading = false
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm = data.news this.dataForm = data.news
this.getClassList([this.dataForm.classid]) this.getClassList([])
this.dataForm.ishead = parseInt(data.news.ishead) this.dataForm.ishead = parseInt(data.news.ishead)
this.dataForm.classid = this.dataForm.classid
this.getClassList([this.dataForm.classid])
this.dataForm.cclassid = this.dataForm.cclassid
this.imgUrlStr = data.news.pic this.imgUrlStr = data.news.pic
this.dialogVisible = true this.dialogVisible = true
this.ueditor.value = this.dataForm.content this.ueditor.value = this.dataForm.content
...@@ -293,7 +298,6 @@ ...@@ -293,7 +298,6 @@
if (id.length === 0) { if (id.length === 0) {
this.classidList = data.data this.classidList = data.data
} else { } else {
this.dataForm.cclassid = ''
this.cclassidList = data.data[0].child this.cclassidList = data.data[0].child
} }
} else { } else {
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<el-button v-if="isAuth('manage:news:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:news:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:news:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:news:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:news:check')" /> <br v-if="isAuth('manage:news:check')" />
<el-button v-if="isAuth('manage:news:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:news:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:news:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:news:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:news:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:news:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
addOrUpdateVisible: false, addOrUpdateVisible: false,
dataForm: { dataForm: {
'title': '', 'title': '',
'levels': '0', 'levels': null,
'author': '', 'author': '',
'editor': '', 'editor': '',
'keyword': '', 'keyword': '',
...@@ -274,6 +274,15 @@ ...@@ -274,6 +274,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
......
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
<el-button v-if="isAuth('manage:newsmovie:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:newsmovie:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:newsmovie:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:newsmovie:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:newsmovie:check')" /> <br v-if="isAuth('manage:newsmovie:check')" />
<el-button v-if="isAuth('manage:newsmovie:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:newsmovie:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:newsmovie:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:newsmovie:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:newsmovie:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:newsmovie:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
'keyword': '', 'keyword': '',
'status': '', 'status': '',
'clanguage': '', 'clanguage': '',
'levels': '0' 'levels': null
}, },
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
...@@ -312,6 +312,15 @@ ...@@ -312,6 +312,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msgVideo?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<el-button v-if="isAuth('manage:newtopic:check')" type="text" size="small" @click="checkHandle(scope.row.classid,1)">[成功]</el-button> <el-button v-if="isAuth('manage:newtopic:check')" type="text" size="small" @click="checkHandle(scope.row.classid,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:newtopic:check')" type="text" size="small" @click="checkHandle(scope.row.classid,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:newtopic:check')" type="text" size="small" @click="checkHandle(scope.row.classid,-1)">[失败]</el-button>
<br v-if="isAuth('manage:newtopic:check')" /> <br v-if="isAuth('manage:newtopic:check')" />
<el-button v-if="isAuth('manage:newtopic:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.classid,true)">预览</el-button> <el-button v-if="isAuth('manage:newtopic:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:newtopic:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.classid)">修改</el-button> <el-button v-if="isAuth('manage:newtopic:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.classid)">修改</el-button>
<el-button v-if="isAuth('manage:newtopic:delete')" type="text" size="small" @click="deleteHandle(scope.row.classid)">删除</el-button> <el-button v-if="isAuth('manage:newtopic:delete')" type="text" size="small" @click="deleteHandle(scope.row.classid)">删除</el-button>
</template> </template>
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
addOrUpdateVisible: false, addOrUpdateVisible: false,
dataForm: { dataForm: {
title: '', title: '',
levels: '0', levels: null,
status: '', status: '',
classnum: '', classnum: '',
inputdate: '' inputdate: ''
...@@ -235,6 +235,15 @@ ...@@ -235,6 +235,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/viewsub?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -68,15 +68,15 @@ ...@@ -68,15 +68,15 @@
<el-form-item label='图片:' prop='picFile'> <el-form-item label='图片:' prop='picFile'>
<el-upload <el-upload
v-show="!showInfo" v-show="!showInfo"
class="avatar-uploader" class="avatar-uploader avatar2"
action="" action=""
:show-file-list="false" :show-file-list="false"
:http-request="Upload" :http-request="Upload"
:before-upload="beforeAvatarUpload"> :before-upload="beforeAvatarUpload">
<img v-if="dialogVisible" :src="imgUrlStr" class="avatar"> <img v-if="dialogVisible" :src="imgUrlStr" class="">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<p><img :src="imgUrlStr" class="avatar" v-show="showInfo"></p> <p><img :src="imgUrlStr" class="avatar2" v-show="showInfo"></p>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer" v-show="!showInfo"> <span slot="footer" class="dialog-footer" v-show="!showInfo">
...@@ -267,10 +267,12 @@ export default { ...@@ -267,10 +267,12 @@ export default {
if (!isJPG) { if (!isJPG) {
if (!isPNG) { if (!isPNG) {
this.$message.error('上传图片只能是 JPG, PNG 格式!') this.$message.error('上传图片只能是 JPG, PNG 格式!')
return
} }
} }
if (!isLt2M) { if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!') this.$message.error('上传头像图片大小不能超过 2MB!')
return
} }
if (file) { if (file) {
var windowURL = window.URL || window.webkitURL var windowURL = window.URL || window.webkitURL
......
<template> <template>
<div class="mod-config mod-list-form"> <div class="mod-config mod-list-form">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()" label-width="80px"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSub()" label-width="80px">
<el-form-item label='标题' prop='title'> <el-form-item label='标题' prop='title'>
<el-input v-model='dataForm.title' placeholder='请输入标题' clearable></el-input> <el-input v-model='dataForm.title' placeholder='请输入标题' clearable></el-input>
</el-form-item> </el-form-item>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-button class="seach-btn" @click="getDataList()" type="primary" >搜索</el-button> <el-button class="seach-btn" @click="getDataListSub()" type="primary" >搜索</el-button>
</el-form> </el-form>
<div class="add-btn"> <div class="add-btn">
<el-button v-if="isAuth('manage:picture:save')" type="primary" @click="addOrUpdateHandle()"> + 添加</el-button> <el-button v-if="isAuth('manage:picture:save')" type="primary" @click="addOrUpdateHandle()"> + 添加</el-button>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<el-button v-if="isAuth('manage:picture:check')" type="text" size="small" @click="checkHandle(scope.row.pictureid,1)">[成功]</el-button> <el-button v-if="isAuth('manage:picture:check')" type="text" size="small" @click="checkHandle(scope.row.pictureid,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:picture:check')" type="text" size="small" @click="checkHandle(scope.row.pictureid,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:picture:check')" type="text" size="small" @click="checkHandle(scope.row.pictureid,-1)">[失败]</el-button>
<br v-if="isAuth('manage:picture:check')" /> <br v-if="isAuth('manage:picture:check')" />
<el-button v-if="isAuth('manage:picture:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.pictureid,true)">预览</el-button> <el-button v-if="isAuth('manage:picture:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:picture:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.pictureid)">修改</el-button> <el-button v-if="isAuth('manage:picture:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.pictureid)">修改</el-button>
<el-button v-if="isAuth('manage:picture:delete')" type="text" size="small" @click="deleteHandle(scope.row.pictureid)">删除</el-button> <el-button v-if="isAuth('manage:picture:delete')" type="text" size="small" @click="deleteHandle(scope.row.pictureid)">删除</el-button>
</template> </template>
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
addOrUpdateVisible: false, addOrUpdateVisible: false,
dataForm: { dataForm: {
title: '', title: '',
pictureLevel: '0', pictureLevel: null,
editor: '', editor: '',
keyword: '', keyword: '',
status: '', status: '',
...@@ -172,6 +172,10 @@ ...@@ -172,6 +172,10 @@
this.getDataList() this.getDataList()
}, },
methods: { methods: {
getDataListSub () {
this.pageIndex = 1
this.getDataList()
},
// 获取数据列表 // 获取数据列表
getDataList () { getDataList () {
this.dataListLoading = true this.dataListLoading = true
...@@ -223,8 +227,14 @@ ...@@ -223,8 +227,14 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (id) { showMsg (data) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + id, '_blank') if (!data.jumppath || data.jumppath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + data.pictureid, '_blank')
} else if (/^\//.test(data.jumppath)) {
window.open(this.$store.state.config.urls + data.jumppath, '_blank')
} else {
window.open(data.jumppath, '_blank')
}
}, },
// 删除 // 删除
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<el-button v-if="isAuth('manage:logistics:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:logistics:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:logistics:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:logistics:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:logistics:check')" /> <br v-if="isAuth('manage:logistics:check')" />
<el-button v-if="isAuth('manage:logistics:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:logistics:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:logistics:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:logistics:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:logistics:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:logistics:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -203,6 +203,15 @@ ...@@ -203,6 +203,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.jumppath || data.jumppath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + data.id, '_blank')
} else if (/^\//.test(data.jumppath)) {
window.open(this.$store.state.config.urls + data.jumppath, '_blank')
} else {
window.open(data.jumppath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<el-button v-if="isAuth('manage:medical:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:medical:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:medical:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:medical:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:medical:check')" /> <br v-if="isAuth('manage:medical:check')" />
<el-button v-if="isAuth('manage:medical:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:medical:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:medical:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:medical:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:medical:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:medical:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -183,6 +183,15 @@ ...@@ -183,6 +183,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/HealthDetail?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:center:check')" /> <br v-if="isAuth('manage:center:check')" />
<el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:center:check')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
editor: '', editor: '',
keyword: '', keyword: '',
status: '', status: '',
levels: '0' levels: null
}, },
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
...@@ -270,6 +270,15 @@ ...@@ -270,6 +270,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<el-button v-if="isAuth('manage:hotFlow:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:hotFlow:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:hotFlow:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:hotFlow:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:hotFlow:check')" /> <br v-if="isAuth('manage:hotFlow:check')" />
<el-button v-if="isAuth('manage:hotFlow:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:hotFlow:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:hotFlow:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:hotFlow:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:hotFlow:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:hotFlow:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
editor: '', editor: '',
keyword: '', keyword: '',
status: '', status: '',
levels: '0' levels: null
}, },
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
...@@ -266,6 +266,15 @@ ...@@ -266,6 +266,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<el-button v-if="isAuth('manage:rules:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:rules:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:rules:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:rules:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:rules:check')" /> <br v-if="isAuth('manage:rules:check')" />
<el-button v-if="isAuth('manage:rules:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:rules:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:rules:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:rules:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:rules:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:rules:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
editor: '', editor: '',
keyword: '', keyword: '',
status: '', status: '',
levels: '0' levels: null
}, },
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
...@@ -269,6 +269,15 @@ ...@@ -269,6 +269,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<el-button type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br /> <br />
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
editor: '', editor: '',
keyword: '', keyword: '',
status: '', status: '',
levels: '0' levels: null
}, },
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
...@@ -267,6 +267,15 @@ ...@@ -267,6 +267,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<el-button v-if="isAuth('manage:policy:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button> <el-button v-if="isAuth('manage:policy:check')" type="text" size="small" @click="checkHandle(scope.row.id,1)">[成功]</el-button>
<el-button v-if="isAuth('manage:policy:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button> <el-button v-if="isAuth('manage:policy:check')" type="text" size="small" @click="checkHandle(scope.row.id,-1)">[失败]</el-button>
<br v-if="isAuth('manage:policy:check')" /> <br v-if="isAuth('manage:policy:check')" />
<el-button v-if="isAuth('manage:policy:info')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id,true)">预览</el-button> <el-button v-if="isAuth('manage:policy:info')" type="text" size="small" @click="showMsg(scope.row)">预览</el-button>
<el-button v-if="isAuth('manage:policy:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button> <el-button v-if="isAuth('manage:policy:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button v-if="isAuth('manage:policy:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button> <el-button v-if="isAuth('manage:policy:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template> </template>
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
addOrUpdateVisible: false, addOrUpdateVisible: false,
dataForm: { dataForm: {
'title': '', 'title': '',
'levels': '0', 'levels': null,
'class1': '', 'class1': '',
'editor': '', 'editor': '',
'keyword': '', 'keyword': '',
...@@ -269,6 +269,15 @@ ...@@ -269,6 +269,15 @@
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
showMsg (data) {
if (!data.directpath || data.directpath === null) {
window.open(this.$store.state.config.urls + '/Knowledge/Statuteinfo?id=' + data.id, '_blank')
} else if (/^\//.test(data.directpath)) {
window.open(this.$store.state.config.urls + data.directpath, '_blank')
} else {
window.open(data.directpath, '_blank')
}
},
// 删除 // 删除
deleteHandle (id) { deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => { var ids = id ? [id] : this.dataListSelections.map(item => {
......
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