diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index f9d83ab..8e8bb7c 100644 --- a/src/app/pages/plan/plan.component.html +++ b/src/app/pages/plan/plan.component.html @@ -22,7 +22,7 @@ - +
名称 @@ -32,13 +32,20 @@ 请选择模型类型 - + + + 上传文件 + + 上传文件 +

选择文件:

+
+
diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index 9e025ed..3cb243d 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -75,6 +75,15 @@ export class PlanComponent implements OnInit { isShowBuildingPop: boolean = false; //显隐 新增/编辑左侧建筑弹窗 isShowLeftBuilding: boolean = true; //显隐 建筑list toggleLeftBuilding(e) { this.isShowLeftBuilding = e }; //显隐 建筑list + + uploadList: File[] = []; //多选上传文件 + //选择文件 + selectFile(e) { + if (e.target.files.length) { + this.uploadList = [] //多选上传 + Object.keys(e.target.files).forEach(item => { this.uploadList.push(e.target.files[item]) }) + } + } //选择建筑 selectLeftBuilding(e) { diff --git a/src/app/pages/plan/publicPop.scss b/src/app/pages/plan/publicPop.scss index b6f81bd..4ca89fc 100644 --- a/src/app/pages/plan/publicPop.scss +++ b/src/app/pages/plan/publicPop.scss @@ -1,30 +1,24 @@ -.keyMargin { +//上传CAD弹窗 inputfile +.uploadBackGround { + width: 125px; + padding: 0 25px; + height: 30px; + line-height: 30px; + position: relative; + cursor: pointer; + color: #0275e7; + font-size: 14px; + background: #fafafa; + border: 1px solid #0275e7; + border-radius: 5px; + overflow: hidden; + display: inline-block; +} +.uploadBackGround input { + position: absolute; width: 100%; - margin-bottom: 10px; - text-align: center; - .mat-form-field { width: 100%; } - //上传CAD弹窗 inputfile - .uploadBackGround { - width: 125px; - padding: 0 25px; - height: 30px; - line-height: 30px; - position: relative; - cursor: pointer; - color: #0275e7; - font-size: 14px; - background: #fafafa; - border: 1px solid #0275e7; - border-radius: 5px; - overflow: hidden; - display: inline-block; - } - .uploadBackGround input { - position: absolute; - width: 100%; - right: 0; - top: 0; - opacity: 0; - cursor: pointer - } + right: 0; + top: 0; + opacity: 0; + cursor: pointer } \ No newline at end of file diff --git a/src/theme.less b/src/theme.less index 2f4ac7f..35e8815 100644 --- a/src/theme.less +++ b/src/theme.less @@ -6,7 +6,7 @@ @border-color-base: #8aacce; -@select-background: #002552; +@select-background: transparent; .ant-select-single:not(.ant-select-customize-input) .ant-select-selector, .ant-picker,