Commit 2436494d authored by 赵伟庚's avatar 赵伟庚

update:字典配置、推荐管理

parent 28eb0704
......@@ -19,7 +19,7 @@
<page404></page404>
</div>
</div>
<msg v-model="readFlag"></msg>
<!-- <msg v-model="readFlag"></msg> -->
</el-config-provider>
</div>
</template>
......@@ -93,7 +93,7 @@ export default {
}
},
created(){
this.initMsg()
// this.initMsg()
},
mounted() {
},
......
......@@ -11,7 +11,7 @@
</bg-table-btn>
<a
class="bg-table-btn"
@mouseenter="showMOreBtns"
@mouseenter="showMoreBtns"
@mouseleave="hideMoreBtns"
v-if="otherOperations.length > 0"
>
......@@ -19,7 +19,7 @@
<bg-icon style="font-size: 12px; color: #2b4695;" icon="#bg-ic-s-more" />
<bg-table-btns-more
:operations="otherOperations"
@mouseenter="showMOreBtns"
@mouseenter="showMoreBtns"
@mouseleave="hideMoreBtns"
v-if="showMore"
/>
......@@ -50,7 +50,7 @@ export default {
return this.operations.slice(0, this.operations.length > 3 ? 2 : 3);
},
otherOperations() {
return this.operations.slice(2, this.operations.length);
return this.operations.slice(this.operations.length > 3 ? 2 : 3, this.operations.length);
},
},
methods: {
......@@ -78,7 +78,7 @@ export default {
return name;
}
},
showMOreBtns() {
showMoreBtns() {
if (this.timer) clearTimeout(this.timer);
this.showMore = true;
......
......@@ -46,7 +46,7 @@ function getMsgAppid() {
})
}
getMsgAppid()
// getMsgAppid()
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
createVue.component(key, component)
......
......@@ -22,13 +22,13 @@
<div class="flex_right">
<div class="main_container">
<bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入关键字">
<template v-slot:left_action>
<template v-slot:left_action v-if="nodeClassifyId != '263758a4-0349-4d49-a816-e8ff8d33a8bb'">
<div class="apaas_button">
<el-button class="register_btn" type="primary" @click="register">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新建
</el-button>
</div>
<el-button class="register_btn" type="primary" @click="register">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新建
</el-button>
</div>
</template>
<template v-slot:filter_group>
<div class="left-filter filter_list">
......@@ -317,28 +317,48 @@ const filterClear = () => {
} // 重置筛选项
const getOperations = (row) => {
return [
{
name: "编辑",
callback: () => edit_row(row),
disabled: row.state == 1,
},
{
name: "删除",
callback: () => delete_row(row),
disabled: row.state == 1,
},
{
name: "上移",
callback: () => moveRow(row,1),
disabled: !row.canMoveUp,
},
{
name: "下移",
callback: () => moveRow(row,2),
disabled: !row.canMoveDown,
},
];
if (state.nodeClassifyId == '263758a4-0349-4d49-a816-e8ff8d33a8bb') {
return [
{
name: "编辑",
callback: () => edit_row(row),
disabled: row.state == 1,
},
{
name: "上移",
callback: () => moveRow(row,1),
disabled: !row.canMoveUp,
},
{
name: "下移",
callback: () => moveRow(row,2),
disabled: !row.canMoveDown,
},
]
}else {
return [
{
name: "编辑",
callback: () => edit_row(row),
disabled: row.state == 1,
},
{
name: "删除",
callback: () => delete_row(row),
disabled: row.state == 1,
},
{
name: "上移",
callback: () => moveRow(row,1),
disabled: !row.canMoveUp,
},
{
name: "下移",
callback: () => moveRow(row,2),
disabled: !row.canMoveDown,
},
];
}
} // 表格操作按钮
const getTableRows = () => {
......
......@@ -177,23 +177,43 @@ const state = reactive({
})
const getDetail = (id) => {
// axios
// .get(`/apaas/system/v5/banner/${id}`)
// .then(res => {
// if (res.data.code == 200) {
// const data = res.data.data
// typeFormRef.value.setForm({
// business_type_id: data.business_type_id,
// logo: data.logo ? [{url: data.logo}] : [],
// })
// state.formData.state = data.state
// }else {
// ElMessage.error(res.data.data)
// }
// })
// .catch(err => {
// console.log(err)
// })
axios
.get(`/apaas/system/v5/recommend/ability/detail/${id}`)
.then(res => {
if (res.data.code == 200) {
const data = res.data.data
console.log(data)
typeFormRef.value.setForm({
business_type_id: data.business_type_id,
logo: data.logo ? [{url: data.logo}] : [],
})
state.selectArr = []
state.selectArrNew = []
state.formData.state = data.state
state.formData.business_type_id = data.business_type_id
state.selectArrNew = data.ability_list || []
state.selectArrNew.forEach((e,i) => {
e.canDown = true
e.canUp = true
if (i == 0) {
e.canUp = false
}
if (i == state.selectArrNew.length - 1) {
e.canDown = false
}
})
state.selectArr.push(...state.selectArrNew)
for (var i = 0; i < 9-state.selectArrNew.length;i++) {
state.selectArr.push("")
}
console.log(state.selectArr)
}else {
ElMessage.error(res.data.data)
}
})
.catch(err => {
console.log(err)
})
}
const getOrgList = () => {
......@@ -378,6 +398,7 @@ const submitFormData = (data) => {
id: +route.query.id,
abilitys: abilitys
}
delete params.business_type_id
params.logo = params.logo && params.logo.length > 0 ? params.logo[0].url : ''
console.log(params)
axios
......
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