feat:新增判断

main
liu.tao3 2 years ago
parent 1b8bb8910c
commit 88257e4c98

@ -155,6 +155,12 @@
<el-button type="primary" @click="confirm"> <el-button type="primary" @click="confirm">
确定 确定
</el-button> </el-button>
<el-button
type='primary'
@click="jumpto"
>
组件管理
</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -204,6 +210,10 @@ export default {
this.remoteComponentlist = [...innerRemoteComponents, ...getRemoteComponents()] this.remoteComponentlist = [...innerRemoteComponents, ...getRemoteComponents()]
}, },
methods: { methods: {
jumpto(){
let {href} = this.$router.resolve(`/big-screen-components?edit=1`)
window.open(href,'_blank')
},
chooseComponent(component) { chooseComponent(component) {
this.focus = _.cloneDeep(component) this.focus = _.cloneDeep(component)
}, },

@ -59,6 +59,12 @@
<el-button type="primary" @click="confirm"> <el-button type="primary" @click="confirm">
确定 确定
</el-button> </el-button>
<el-button
type='primary'
@click="jumpto"
>
组件管理
</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -88,6 +94,10 @@ export default {
}, },
mounted() { }, mounted() { },
methods: { methods: {
jumpto(){
let {href} = this.$router.resolve(`/big-screen-source?edit=1`)
window.open(href,'_blank')
},
chooseImg(img) { chooseImg(img) {
this.focus = _.cloneDeep(img) this.focus = _.cloneDeep(img)
}, },

@ -280,7 +280,6 @@ export default {
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
if (row.editable == 1 && !this.appCode) return if (row.editable == 1 && !this.appCode) return
dataSourceCheck(row.id).then((res)=>{ dataSourceCheck(row.id).then((res)=>{
console.log(res)
if(res.canDelete){ if(res.canDelete){
this.$confirm('确定删除当前数据源吗?', '提示', { this.$confirm('确定删除当前数据源吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',

@ -39,12 +39,29 @@ export default {
}, },
computed: { computed: {
title () { title () {
if (this.$route.query.edit) return '智能报表平台'
return window?.BS_CONFIG?.starter?.title return window?.BS_CONFIG?.starter?.title
}, },
logo () { logo () {
return window?.BS_CONFIG?.starter?.logo || require('./images/logo.png') return window?.BS_CONFIG?.starter?.logo || require('./images/logo.png')
}, },
tabList () { tabList () {
if (this.$route.query.edit) {
return [
{
id: 1,
name: '资源库',
path: window?.BS_CONFIG?.routers?.sourceUrl || '/big-screen-source',
icon: 'icon-tupian'
},
{
id: 2,
name: '组件库',
path: window?.BS_CONFIG?.routers?.componentUrl || '/big-screen-components',
icon: 'icon-zujian1'
}
]
}
return [ return [
{ {
id: 0, id: 0,
@ -90,9 +107,16 @@ export default {
created () {}, created () {},
methods: { methods: {
changeTab (tab) { changeTab (tab) {
if (this.$route.query.edit) {
this.$router.push({
path: tab.path,
query: { edit: 1 }
})
}else{
this.$router.push({ this.$router.push({
path: tab.path path: tab.path
}) })
}
} }
} }
} }

@ -17,7 +17,7 @@ const datasetPage = (params = {}, flag = false) => Vue.prototype.$dataRoomAxios.
* @param flag * @param flag
* @returns {*} * @returns {*}
*/ */
const dataSourceCheck = (id='-1', flag = false) => Vue.prototype.$dataRoomAxios.post(`/datasource/deleteCheck/${id}`, {}, flag) const datasetCheck = (id='-1', flag = false) => Vue.prototype.$dataRoomAxios.post(`/dataset/deleteCheck/${id}`, {}, flag)
/** /**
@ -123,5 +123,5 @@ export {
categoryAdd, categoryAdd,
categoryUpdate, categoryUpdate,
categoryRemove, categoryRemove,
dataSourceCheck datasetCheck
} }

Loading…
Cancel
Save