From 1767faa85ca861136b40c84e1fdcf5a6f9d66994 Mon Sep 17 00:00:00 2001 From: wyx Date: Thu, 19 Jan 2023 10:19:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=A1=B9=E7=9B=AE/=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=9B=BE/=E9=9D=A2=E6=8E=88=E8=AF=BE=E5=AD=A6=E5=91=98?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=85=A8=E8=B7=AF=E5=BE=84=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/student/TableStudent.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/student/TableStudent.vue b/src/components/student/TableStudent.vue index 2908b9b5..586d4600 100644 --- a/src/components/student/TableStudent.vue +++ b/src/components/student/TableStudent.vue @@ -457,6 +457,8 @@ const tablecolumns = ref([ align: "center", className: "h", ellipsis: true, + customRender: ({ record: { studentOrgName, studentDepartName } }) => + (allDepartShow(studentOrgName, studentDepartName)), }, { title: "加入方式", @@ -478,6 +480,14 @@ const tablecolumns = ref([ slots: { customRender: "action" }, }, ]); + +function allDepartShow(a,b) { + let org = (a=="" || a == null || a == undefined) ? a = "" : a.slice(0,1) =='/' ? a.slice(1,a.length) : a; + let depart = (b=="" || b == null || b == undefined) ? b = "" : b; + let allname = org == "" && depart == "" ? '-' : org + depart; + return allname; +} + const tableParam = ref({ studentName: "", //学员名称 groupName: "", //学员小组