Browse Source

禅道bug处理

master
suyanyan 2 months ago
parent
commit
9a560fca45
2 changed files with 22 additions and 13 deletions
  1. +13
    -5
      SafeCampus.WEB/src/views/userManage/clothing/index.vue
  2. +9
    -8
      SafeCampus.WEB/src/views/userManage/major/index.vue

+ 13
- 5
SafeCampus.WEB/src/views/userManage/clothing/index.vue View File

@@ -5,13 +5,16 @@
-->
<template>
<div class="main-box">
<!-- :request-api="userManageClothApi.getList" -->
<TreeFilter
ref="treeFilter"
label="clothSetName"
id="clothSetId"
width="300px"
:show-all="true"
:request-api="userManageClothApi.getList"
:show-all="false"
:isData="true"
:data="treeData"
:default-value="clothSetId"
@change="changeTreeFilter"
>
<template v-slot:header>
@@ -35,7 +38,7 @@
<ProTable ref="proTable" title="服装库管理" :columns="columns" rowKey="clothId" :data="tableData.clothes">
<!-- 表格 header 按钮 -->
<template #tableHeader="scope">
<s-button suffix="服装" @click="onOpen(FormOptEnum.ADD, { clothSetId: clothSetId }, treeFilter.treeAllData)" />
<s-button suffix="服装" @click="onOpen(FormOptEnum.ADD, { clothSetId: clothSetId }, treeData)" />
<s-button
type="danger"
:opt="FormOptEnum.DELETE"
@@ -87,6 +90,8 @@ const treeFilter = ref<any>({});
const userStore = useUserStore();
const { accessToken } = userStore;
const tableData = ref<any>([])
// 初始化数据
const treeData = ref<any>([]);
// 表格配置项
const columns: ColumnProps<SysUserCloth.list>[] = [
{ type: "selection", fixed: "left", width: 50 },
@@ -171,14 +176,17 @@ function changeTreeFilter(val: number | string) {
}
// 获取列表
const getList = (clothSetId:any)=>{
// if(!clothSetId) return false
if(!clothSetId) return false
userManageClothApi.page({clothSetId:clothSetId}).then((resp:any)=>{
if(resp.code == 200){
tableData.value = resp.data
}
})
}
onMounted(() => {
onMounted(async () => {
const { data }:any = await userManageClothApi.getList({});
treeData.value = data;
clothSetId.value = data[0].clothSetId.toString()
getList(clothSetId.value)
})
</script>


+ 9
- 8
SafeCampus.WEB/src/views/userManage/major/index.vue View File

@@ -62,6 +62,15 @@ const getDepartmentList = async () => {
// 表格配置项
const columns: ColumnProps<SysMajor.MajorInfo>[] = [
{ type: "selection", fixed: "left", width: 50 },
{
prop: "code",
label: "专业编号"
},
{
prop: "name",
label: "专业名称"
},
{
prop: "depId",
label: "所属院系",
@@ -72,14 +81,6 @@ const columns: ColumnProps<SysMajor.MajorInfo>[] = [
},
fieldNames: { label: "name", value: "id" }
},
{
prop: "code",
label: "专业编号"
},
{
prop: "name",
label: "专业名称"
},
{
prop: "introduce",
label: "专业简介"


Loading…
Cancel
Save