Commit 609aa0c2 authored by 赵伟庚's avatar 赵伟庚

update: 需求优化内容,能力推荐交互优化

parent 5b5c2472
......@@ -11,8 +11,9 @@
:indeterminate="option.isIndeterminate"
@change="changeSelf"
>
<span :title="option.name">
<span :title="option.name + (option.remark ? `(${option.remark})` : '')">
{{ option.name }}
{{option.remark ? `(${option.remark})` : ""}}
</span>
</el-checkbox>
</div>
......
......@@ -98,6 +98,7 @@ export default {
name: nameProp,
value: valueProp,
children: childrenProp,
remark: remarkProp,
} = this.props;
let permissionData = [];
let traverseOptions = (item) => {
......@@ -107,9 +108,11 @@ export default {
let children = item[childrenProp];
let isSelected = this.values.indexOf(value) > -1;
let isIndeterminate = false;
let remark = item[remarkProp];
result.name = name;
result.value = value;
result.remark = remark;
if (children && children.length > 0) {
......
......@@ -2565,7 +2565,7 @@ a {
text-overflow: ellipsis;
word-break: break-all;
white-space: nowrap;
width: 8em;
width: 10em;
display: inline-block;
vertical-align: middle;
line-height: 16px;
......
<template>
<div class="item_card">
<div class="item_card" :style="{'height':props.flag ? '242px' : '206px'}">
<div class="action_box" v-if="props.flag">
<div class="can_click_text" @click="deleteItem(props.item)">删除</div>
<div class="can_click_text" @click="move(1)" :class="props.item.canDown ? '' : 'disabled'">下移</div>
<div class="can_click_text" @click="move(2)" :class="props.item.canUp ? '' : 'disabled'">上移</div>
</div>
<div class="top_info">
<div class="top_info" :style="{'padding-left': !props.flag ? '8px' : '24px'}">
<el-checkbox
v-if="!props.flag"
class="select_box"
v-model="props.item.checked"
@change="change_check"
......@@ -54,7 +55,7 @@
</div>
</div>
</div>
<div class="bottom_info">
<div class="bottom_info" :style="{'height':props.flag ? 'calc(100% - 128px)' : 'calc(100% - 92px)'}">
<div class="desc" :title="props.item.synopsis">
{{props.item.synopsis}}
</div>
......@@ -112,8 +113,8 @@ const move = (type) => {
<style lang="scss" scoped>
.item_card {
width: 100%;
margin-right: 16px;
width: 384px;
// margin-right: 16px;
margin-bottom: 16px;
height: 206px;
background-color: #ffffff;
......@@ -129,6 +130,8 @@ const move = (type) => {
display: flex;
line-height: 36px;
flex-direction: row-reverse;
border-radius: 6px 6px 0 0;
font-size: 14px;
.can_click_text {
margin-right: 16px;
}
......
<template>
<div class="card_list">
<div v-for="(e,i) in props.list" :key="'card' + i" class="item" style="width: calc((100% - 32px) / 3)">
<div v-for="(e,i) in props.list" :key="'card' + i" class="item">
<ability-card v-if="e.id" :item="e" @change_check="changeCheck" :flag="props.flag" @deleteItem="deleteItem" @move="move"/>
<div v-else class="empty_card" @click="open">
<span>+</span>
......@@ -39,12 +39,15 @@ const move = (temp) => {
<style lang="scss" scoped>
.card_list {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
// .item {
// width: calc(100% - 32px);
// }
// transform: translateX(-16px);
// justify-content: space-between;
.item {
// width: calc((100% - 32px) / 3);
margin-left: 16px;
}
.empty_card {
cursor: pointer;
width: 384px;
......
......@@ -102,7 +102,7 @@
>
<el-form-item label="名称" prop="name">
<el-input
v-model="formData.name"
v-model.trim="formData.name"
show-word-limit
:maxlength="
nodeClassifyId == 'eb9c7d70-c123-42b7-8e61-dde1b022b669'
......
......@@ -26,7 +26,7 @@
</div>
<div>
<div class="title">
<div><span class="icon_box"></span> 基础信息</div>
<div><span class="icon_box"></span> 联系人信息</div>
<div class="dashed_line">
</div>
</div>
......
......@@ -9,7 +9,7 @@
class="menu_form"
>
<el-form-item label="菜单名称" prop="menu_name">
<el-input v-model="menuForm.menu_name" show-word-limit maxlength="8" placeholder="请输入菜单名称" />
<el-input v-model.trim="menuForm.menu_name" show-word-limit maxlength="8" placeholder="请输入菜单名称" />
</el-form-item>
<el-form-item label="类型" prop="menu_type" v-if="!topLevel">
<el-radio-group v-model="menuForm.menu_type" :disabled="radioDisabled">
......@@ -56,6 +56,7 @@
inline-prompt
active-text="是"
inactive-text="否"
:disabled="disabledSwitch"
/>
</el-form-item>
<el-form-item label="菜单路径" :prop="topLevel ? '' : 'menu_url'">
......@@ -174,6 +175,7 @@ const state = reactive({
topLevel: false,
typeDisFlag: null,
groupFlag: true,
disabledSwitch: false, // 内置菜单built_in为1-不可禁用 0或不存在-可禁用
})
const getGroupList = () => {
......@@ -244,6 +246,7 @@ const setForm = (data) => {
}else {
state.radioDisabled = false
}
state.disabledSwitch = data.built_in && data.built_in == 1 ? true : false
state.menuForm = Object.assign(state.menuForm, data);
} // 表单赋值
......@@ -281,6 +284,7 @@ const {
typeDisFlag,
groupFlag,
systemGroupList,
disabledSwitch,
} = toRefs(state)
defineExpose({ setForm , menuForm, menuRef })
......
......@@ -7,7 +7,7 @@
<type-form ref="typeFormRef" @action="submitFormData" @changeType="changeType"></type-form>
<div class="ability_select">
<div class="title">
<span>已选择能力(0/9)</span>
<span>已选择能力({{selectArrNew.length}}/9)</span>
<el-tooltip
class="box-item"
effect="light"
......@@ -18,13 +18,7 @@
</el-tooltip>
</div>
<div class="select_arr">
<!-- <div v-for="(item,i) in selectArr" :key="'select' +i">
</div> -->
<ability-list :list="selectArr" :flag="true" @openBox="openDialog" @deleteItem="deleteItem" @move="move"></ability-list>
<!-- <div v-for="(e,i) in (9 - selectArr.length)" :key="'empty' +i" class="empty_card" @click="openDialog">
<span>+</span>
</div> -->
</div>
</div>
<div class="state_box">
......@@ -98,7 +92,7 @@
</div>
<div>
<span>已选择</span>
<span class="num">({{selection.length}}/9)</span>
<span class="num">({{selectArrNew.length}}/9)</span>
<span></span>
<span class="can_click_text" @click="clearSelection">清空</span>
</div>
......@@ -142,8 +136,8 @@ const route = useRoute()
const typeFormRef = ref(null);
const state = reactive({
formData: {
type: "",
icon: [],
business_type_id: "",
logo: [],
state: 1
},
emptyArr: ["","","","","","","","",""],
......@@ -191,8 +185,54 @@ const state = reactive({
value:3,
},
],
selection: [],
list: [
list: [],
selectArrNew: []
})
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)
// })
}
const getOrgList = () => {
axios
.get(`/apaas/system/v5/org/tree`)
.then((res) => {
if (res.data.code == 200) {
state.orgList = res.data.data || []
}else {
ElMessage.error(res.data.data)
}
})
} // 获取组织列表
const changeType = (val) => {
state.formData.business_type_id = val
state.selectArr = ["","","","","","","","",""]
state.selectArrNew = []
}
const getAbilityList = () => {
let params = {
...state.dialogFilter,
business_type_id: state.formData.business_type_id
}
console.log(params)
state.list= [
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
......@@ -206,6 +246,7 @@ const state = reactive({
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
ability_id: "5228116e-db80-42ed-9c31-5d681ed434ca",
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
......@@ -224,6 +265,7 @@ const state = reactive({
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101",
ability_id: "cf7d0496-9b65-460a-ba07-82ae10fbbe3d",
},
{
ability_logo: "",
......@@ -240,6 +282,7 @@ const state = reactive({
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101",
ability_id: "00c5fc87-861e-4a58-ade5-03058364ad1e",
},
{
ability_logo: "",
......@@ -255,64 +298,196 @@ const state = reactive({
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
ability_id: "e71240fe-2305-4637-bbb5-316f2cdb77ee",
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
],
selectArrNew: []
})
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({
// type: data.banner_name,
// icon: data.banner_image ? [{url: data.banner_image}] : [],
// })
// state.formData.state = data.state
// }else {
// ElMessage.error(res.data.data)
// }
// })
// .catch(err => {
// console.log(err)
// })
}
const getOrgList = () => {
axios
.get(`/apaas/system/v5/org/tree`)
.then((res) => {
if (res.data.code == 200) {
console.log(res.data.data)
state.orgList = res.data.data || []
}else {
ElMessage.error(res.data.data)
}
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
id: 5,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
ability_id: "ea1488f5-3912-4c83-8b38-98a7dcdafc5f",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
ability_id: "70c371d3-7b7a-4c66-a40f-30d83ac567b3",
id: 6,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
ability_id: "346237c3-9c21-4cf8-ae1d-3d8692ad0255",
id: 7,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
ability_id: "f8039680-7978-4561-982d-96b799459368",
id: 8,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
id: 9,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
id: 10,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
id: 11,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
id: 12,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
id: 13,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
{
ability_logo: "",
ability_name: "冒烟测试1冒烟测试冒烟测试12101",
ability_type: 0,
browse_count: 118,
call_count: 666,
develop: "比格",
develop_id: "0e9f31d8-117c-4be4-bdfb-9af1bddd852e",
id: 14,
include_mock_service: true,
openness: "开放",
openness_id: "9de06ba6-6ee2-4449-91d9-31a1c7554311",
score: 1.9,
sort_weight: 228.2733180765668,
synopsis: "冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101冒烟测试112101",
},
]
state.selectArrNew = []
nextTick(() => {
state.list.forEach(e => {
e.checked = false
state.selectArr.forEach(k => {
if (k.id) {
if (e.id == k.id) {
e.checked = true
state.selectArrNew.push(e)
}
}
})
})
} // 获取组织列表
const changeType = (val) => {
state.formData.type = val
}
const getAbilityList = () => {
let params = {
...state.dialogFilter,
type: state.formData.type
}
console.log(params)
})
}
const openDialog = () => {
console.log(123123123)
state.selectDialog = true
getAbilityList()
}
const deleteItem = (item) => {
console.log(item)
changeCheck(item,true)
}
......@@ -331,6 +506,18 @@ const move = (temp) => {
state.selectArr[index] = state.selectArr[index-1]
state.selectArr[index-1] = temp.item
}
state.selectArr.forEach((e,i) => {
if (e != '') {
e.canDown = true
e.canUp = true
if (i == 0) {
e.canUp = false
}
if (i == state.selectArrNew.length - 1) {
e.canDown = false
}
}
})
}
const changePage = (val) => {
state.dialogFilter.page = 1
......@@ -347,7 +534,10 @@ const changeCollation = (val) => {
}
const clearSelection = () => {
state.selection = []
state.list.forEach(e => {
e.checked = false
})
state.selectArrNew = []
}
const searchAction = () => {
console.log(state.dialogFilter)
......@@ -364,7 +554,7 @@ const clearAction = () => {
}
const changeCheck = (item,deleteFlag) => {
let arr = state.selectArr.map(e => e.id) || []
let arr = state.selectArrNew.map(e => e.id) || []
if (arr.indexOf(item.id) > -1) {
state.selectArrNew.splice(arr.indexOf(item.id),1)
}else {
......@@ -389,55 +579,73 @@ const submit = () => {
}
const conform = () => {
if (state.selectArrNew.length > 9) {
ElMessage.error("最多可选择9个能力")
return
}
state.selectArr = JSON.parse(JSON.stringify(state.selectArrNew))
console.log(state.selectArr)
if (state.selectArr.length < 9) {
let arr = []
for (var i = 0; i < 9-state.selectArr.length; i++ ) {
arr.push("")
}
state.selectArr.push(...arr)
console.log(state.selectArr)
}
state.selectDialog = false
}
const submitFormData = (data) => {
if (state.selectArrNew.length < 6) {
ElMessage.error("最少选择6个能力")
return
}
if (data) {
Object.assign(state.formData,data);
console.log(state.formData)
if (route.query.id) {
// 编辑
let abilitys = []
state.selectArrNew.forEach(e => {
abilitys.push(e.ability_id)
})
let params = {
...state.formData,
id: +route.query.id
id: +route.query.id,
abilitys: abilitys
}
params.icon = params.icon && params.icon.length > 0 ? params.icon[0].url : ''
// axios
// .put(`/apaas/system/v5/banner`,params)
// .then(res => {
// if (res.data.code == 200) {
// ElMessage.success(res.data.msg)
// router.go(-1)
// }else {
// ElMessage.error(res.data.data)
// }
// })
params.logo = params.logo && params.logo.length > 0 ? params.logo[0].url : ''
console.log(params)
axios
.post(`/apaas/system/v5/recommend/ability/update`,params)
.then(res => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg)
router.go(-1)
}else {
ElMessage.error(res.data.data)
}
})
}else {
let abilitys = []
state.selectArrNew.forEach(e => {
abilitys.push(e.ability_id)
})
let params = {
...state.formData,
abilitys: abilitys
}
params.icon = params.icon && params.icon.length > 0 ? params.icon[0].url : ''
// axios
// .post(`/apaas/system/v5/banner`,params)
// .then(res => {
// if (res.data.code == 200) {
// ElMessage.success(res.data.msg)
// router.go(-1)
// }else {
// ElMessage.error(res.data.data)
// }
// })
params.logo = params.logo && params.logo.length > 0 ? params.logo[0].url : ''
console.log(params)
axios
.post(`/apaas/system/v5/recommend/ability/add`,params)
.then(res => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg)
router.go(-1)
}else {
ElMessage.error(res.data.data)
}
})
}
}
}
......@@ -465,6 +673,7 @@ const {
collationArr,
selection,
list,
selectArrNew,
} = toRefs(state)
</script>
......@@ -510,23 +719,21 @@ const {
}
}
.select_arr {
width: 1200px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.empty_card {
cursor: pointer;
width: 384px;
height: 242px;
border: 1px dashed #dadee7;
border-radius: 4px;
margin-bottom: 24px;
color: #dadee7;
text-align: center;
line-height: 242px;
font-size: 48px;
font-weight: 100;
}
width: 1216px;
transform: translateX(-16px);
// .empty_card {
// cursor: pointer;
// width: 384px;
// height: 242px;
// border: 1px dashed #dadee7;
// border-radius: 4px;
// margin-bottom: 24px;
// color: #dadee7;
// text-align: center;
// line-height: 242px;
// font-size: 48px;
// font-weight: 100;
// }
}
}
.state_box {
......@@ -624,18 +831,8 @@ const {
}
.user_table {
max-height: calc(100% - 31px);
padding: 0 16px;
:deep().bg-table {
.el-scrollbar {
--el-scrollbar-bg-color: #fff
}
.el-table__empty-block {
.empty_container {
height: calc(100% - 45px);
}
}
}
// padding: 0 16px;
// padding-left: 16px;
}
}
}
......
......@@ -6,8 +6,8 @@
style="max-width: 1048px"
class="form"
>
<el-form-item label="能力类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择能力类型" style="width: 100%" @change="changeType">
<el-form-item label="能力类型" prop="business_type_id">
<el-select v-model="formData.business_type_id" placeholder="请选择能力类型" style="width: 100%" @change="changeType">
<el-option
v-for="item in TypeList"
:key="item.dict_id"
......@@ -16,8 +16,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="上传图标" prop="icon">
<bg-upload-image v-model="formData.icon" :fileSize="500" :fileSizeUnit="'KB'" :showTips="true" customTips="请选择图片上传:大小36 * 36像素支持jpg、png等格式,图片需小于500KB" :limit="1" listType="picture-card" :accept="['.jpg','.jpeg','.png']"></bg-upload-image>
<el-form-item label="上传图标" prop="logo">
<bg-upload-image v-model="formData.logo" :fileSize="500" :fileSizeUnit="'KB'" :showTips="true" customTips="请选择图片上传:大小36 * 36像素支持jpg、png等格式,图片需小于500KB" :limit="1" listType="picture-card" :accept="['.jpg','.jpeg','.png']"></bg-upload-image>
</el-form-item>
</el-form>
</template>
......@@ -32,14 +32,14 @@ const route = useRoute()
const form = ref(null)
const state = reactive({
formData: {
type: "",
icon: [],
business_type_id: "",
logo: [],
},
formRules: {
type: [
business_type_id: [
{ required: true, message: '请选择业务类型', trigger: 'change' },
],
icon: [
logo: [
{ required: true, message: '请上传图标', trigger: 'change' },
],
},
......
......@@ -17,7 +17,7 @@
class="role_form"
>
<el-form-item prop="role_name" label="角色名称">
<el-input v-model="formData.role_name" maxlength="50" show-word-limit :disabled="rowType != 0" />
<el-input v-model.trim="formData.role_name" maxlength="50" show-word-limit :disabled="rowType != 0" />
</el-form-item>
<el-form-item prop="role_desc" label="描述">
<el-input
......@@ -117,6 +117,7 @@ const roleState = reactive({
name: 'menu_name',
value: 'id',
children: 'Child',
remark: 'remark',
}, // 菜单框默认配置
permissionData: [], // 菜单数据
rowType: 0,
......
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