Browse Source

项目信息 商业信息 组件添加

duxiangyu 3 years ago
parent
commit
ba6a8f03aa

+ 16 - 0
src/components/project-manage/components/business.vue

@@ -0,0 +1,16 @@
+<template>
+  <div class="business-container">
+    <Title name="商业信息" />
+  </div>
+</template>
+
+<script>
+import Title from "./title.vue";
+export default {
+  components: {
+    Title,
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 25 - 7
src/components/project-manage/components/formItem.vue

@@ -1,13 +1,10 @@
 <template>
   <div class="formitem">
+    <!-- 标题 -->
     <div class="label" :style="{ width: labelWidth + 'px' }">
       {{ label }}
-      <Popover
-        v-if="showPop"
-        titleText="我是标题"
-        type="base"
-        placement="top-left"
-      >
+      <!-- 提示 -->
+      <Popover v-if="showPop" type="base" placement="top-left">
         <template #content>
           <article>
             {{ popText }}
@@ -17,11 +14,13 @@
       </Popover>
       :
     </div>
+    <!-- 输出框 -->
     <Input
       v-if="formType === 'input'"
       v-model="value"
       :placeholder="placeholder"
     ></Input>
+    <!-- 输出框带单位 -->
     <Input
       v-if="formType === 'input-unit'"
       v-model="value"
@@ -34,12 +33,31 @@
         },
       ]"
     />
+    <!-- 选择框 -->
     <MSelect
       v-if="formType === 'select'"
       width="180"
       v-model="value"
       :data="selectData"
     />
+    <!-- 上传图片 -->
+    <section class="list" v-if="formType === 'upload'">
+      <ImageUpload
+        hosts="http://47.95.122.141:8209/domita/backend"
+        action="/base/attachment/uploadX"
+        :defaultFileList="value"
+        :previewMode="false"
+        :multiple="true"
+      />
+    </section>
+    <Input
+      v-if="formType === 'textarea'"
+      v-model="value"
+      type="textarea"
+      :rows="6"
+      :autofocus="false"
+      :max-length="10"
+    />
   </div>
 </template>
 <script>
@@ -51,7 +69,7 @@ export default {
       default: "input",
     },
     initValue: [String, Number, Array, Object],
-    placeholder: String,
+    placeholder: "请输入",
     labelWidth: {
       type: Number,
       default: 100,

+ 102 - 0
src/components/project-manage/components/project.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="project-container">
+    <Title name="项目信息" />
+    <div class="form-content">
+      <el-row>
+        <el-col :span="12">
+          <FormItem
+            label="总建筑面积"
+            :initValue="formData.buildArea"
+            formType="input-unit"
+            unit="m²"
+            :showPop="true"
+            popText="各建筑“建筑面积”之和"
+          />
+        </el-col>
+        <el-col :span="12"
+          ><FormItem
+            label="占地面积"
+            :initValue="formData.coverArea"
+            formType="input-unit"
+            unit="m²"
+            :showPop="true"
+            popText="红线面积"
+        /></el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <FormItem
+            label="项目高度"
+            :initValue="formData.height"
+            formType="input-unit"
+            unit="m²"
+          />
+        </el-col>
+        <el-col :span="12"
+          ><FormItem
+            label="耐火等级"
+            :initValue="formData.level"
+            formType="select"
+            :showPop="true"
+        /></el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <FormItem
+            label="项目功能类型"
+            :initValue="formData.type"
+            formType="select"
+          />
+        </el-col>
+        <el-col :span="12"
+          ><FormItem
+            label="地下楼层数"
+            :initValue="formData.floor"
+            formType="input-unit"
+            unit="层"
+        /></el-col>
+      </el-row>
+      <FormItem
+        label="项目Logo"
+        :initValue="formData.logos"
+        formType="upload"
+      />
+      <FormItem
+        label="区位图(城市)"
+        :initValue="formData.citys"
+        formType="upload"
+      />
+      <FormItem
+        label="项目简介"
+        :initValue="formData.desc"
+        formType="textarea"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import Title from "./title.vue";
+import FormItem from "./formItem.vue";
+export default {
+  components: {
+    Title,
+    FormItem,
+  },
+  data() {
+    return {
+      formData: {
+        buildArea: "",
+        coverArea: "",
+        height: "",
+        level: "",
+        type: "",
+        floor: "",
+        logos: [],
+        citys: [],
+        desc: "",
+      },
+    };
+  },
+};
+</script>
+<style lang="less" scoped></style>

+ 7 - 1
src/components/project-manage/index.vue

@@ -5,7 +5,9 @@
     </div>
     <div class="right">
       <Basic name="基本信息" />
-      <Geo nam="地理信息" />
+      <Geo />
+      <Project />
+      <Business />
     </div>
   </div>
 </template>
@@ -13,11 +15,15 @@
 import Anchor from "./components/anchor.vue";
 import Basic from "./components/basic.vue";
 import Geo from "./components/geo.vue";
+import Project from "./components/project.vue";
+import Business from "./components/business.vue";
 export default {
   components: {
     Anchor,
     Basic,
     Geo,
+    Project,
+    Business,
   },
   mounted() {},
   methods: {},

+ 3 - 2
src/meri.js

@@ -1,8 +1,9 @@
 import Vue from 'vue'
-import {Button, Input, MSelect, Icon, Popover} from 'meri-design'
+import {Button, Input, MSelect, Icon, Popover, ImageUpload} from 'meri-design'
 
 Vue.use(Button)
 Vue.use(Input)
 Vue.use(MSelect)
 Vue.use(Icon)
-Vue.use(Popover)
+Vue.use(Popover)
+Vue.use(ImageUpload)