From 0761125c69a53704d6478146b73778af6edb9bd7 Mon Sep 17 00:00:00 2001 From: wuyx Date: Sun, 25 Dec 2022 12:31:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=9D=A2=E6=8E=88=E8=AF=BE=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E4=B8=89=E7=BA=A7=E5=88=86=E7=B1=BB=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/SelFacet.vue | 1361 +++++++++-------- .../courselibrary/components/seeModal.vue | 164 +- 2 files changed, 788 insertions(+), 737 deletions(-) diff --git a/src/components/drawers/SelFacet.vue b/src/components/drawers/SelFacet.vue index b8babf4a..7e008610 100644 --- a/src/components/drawers/SelFacet.vue +++ b/src/components/drawers/SelFacet.vue @@ -1,35 +1,23 @@ \ No newline at end of file diff --git a/src/views/courselibrary/components/seeModal.vue b/src/views/courselibrary/components/seeModal.vue index 877cb44f..0c200ca0 100644 --- a/src/views/courselibrary/components/seeModal.vue +++ b/src/views/courselibrary/components/seeModal.vue @@ -228,126 +228,129 @@ export default defineComponent({ imgList: [], options2222: [ { - title: "领导力", - value: "100", - selectable: false, + title: '领导力', + value: '100', children: [ { - title: "领导业务", - value: "1001", + title: '领导业务', + value: '1001', + children: [ + { + title: '业务能力领导', + value: '100101', + } + ] }, { - title: "领导团队", - value: "1002", + title: '领导团队', + value: '1002', }, { - title: "领导自我", - value: "1003", + title: '领导自我', + value: '1003', }, ], }, { - title: "专业力", - value: "200", - selectable: false, + title: '专业力', + value: '200', children: [ { - title: "研发", - value: "2001", + title: '研发', + value: '2001', }, { - title: "产品和解决方案", - value: "2002", + title: '产品和解决方案', + value: '2002', }, { - title: "生产技术与制造", - value: "2003", + title: '生产技术与制造', + value: '2003', }, { - title: "供应链", - value: "2004", + title: '供应链', + value: '2004', }, { - title: "营销", - value: "2005", + title: '营销', + value: '2005', }, { - title: "品质", - value: "2006", + title: '品质', + value: '2006', }, { - title: "战略与企划", - value: "2007", + title: '战略与企划', + value: '2007', }, { - title: "流程管理", - value: "2008", + title: '流程管理', + value: '2008', }, { - title: "业绩管理", - value: "2009", + title: '业绩管理', + value: '2009', }, { - title: "项目管理", - value: "20010", + title: '项目管理', + value: '20010', }, { - title: "信息技术", - value: "20011", + title: '信息技术', + value: '20011', }, { - title: "环境与安全", - value: "20012", + title: '环境与安全', + value: '20012', }, { - title: "人力资源", - value: "20013", + title: '人力资源', + value: '20013', }, { - title: "企业文化", - value: "20014", + title: '企业文化', + value: '20014', }, { - title: "品牌", - value: "20015", + title: '品牌', + value: '20015', }, { - title: "财务", - value: "20016", + title: '财务', + value: '20016', }, { - title: "法务", - value: "20017", + title: '法务', + value: '20017', }, { - title: "行政", - value: "20018", + title: '行政', + value: '20018', }, { - title: "医工", - value: "20019", - }, + title: '医工', + value: '20019', + } ], }, { - title: "通用力", - value: "300", - selectable: false, + title: '通用力', + value: '300', children: [ { - title: "职业操守与道德", - value: "3001", + title: '职业操守与道德', + value: '3001', }, { - title: "职业素养与技能", - value: "3002", + title: '职业素养与技能', + value: '3002', }, { - title: "规章制度", - value: "3003", + title: '规章制度', + value: '3003', }, ], - }, + } ], ceshi: "https://u-pre.boe.com/upload/测试下载ppt2-1671002026755.pptx", ceshi2: "http://111.231.196.214:12016/测试下载ppt3-1671001683026.pptx", @@ -370,14 +373,47 @@ export default defineComponent({ if (txt) { for (let i = 0; i < options2.value.length; i++) { for (let j = 0; j < options2.value[i].children.length; j++) { - if (String(options2.value[i].children[j].value) === String(txt)) { - str = options2.value[i].children[j].title; - } + str = changeTreeSelectValue(String(txt)) + // if (String(options2.value[i].children[j].value) === String(txt)) { + // str = options2.value[i].children[j].title; + // } } } } return str; }; + + // 格式化树型结构选择数据 + const changeTreeSelectValue = (values) => { + let data = state.options2222; + console.log(values, data) + let str = '' + for (let i = 0; i < data.length; i++) { + if (data[i].value == values) { + str = data[i].title + } else { + for (let j = 0; j < data[i].children.length; j++) { + if (data[i].children[j].value == values) { + str = data[i].title + '/' + data[i].children[j].title + } else { + if (data[i].children[j].children) { + for (let k = 0; k < data[i].children[j].children.length; k++) { + if (data[i].children[j].children[k].value == values) { + str = data[i].title + '/' + data[i].children[j].title + '/' + data[i].children[j].children[k].title + } else { + str = '-' + } + } + } + } + } + } + } + console.log('str-str-str-str', str) + state.fen_lei1 = str; + return str; + } + const filterSenceTxt = (txt) => { let str = "-"; if (txt) {