瀏覽代碼

Merge branch 'dataType' of http://39.106.8.246:3003/web/adm into dataType

haojianlong 4 年之前
父節點
當前提交
53b7c84a36
共有 31 個文件被更改,包括 4150 次插入99 次删除
  1. 二進制
      adm/favicon.ico
  2. 1 0
      adm/index.html
  3. 59 0
      adm/static/css/app.cd26bca471894157aa9dc778892f7c87.css
  4. 1 0
      adm/static/css/app.cd26bca471894157aa9dc778892f7c87.css.map
  5. 二進制
      adm/static/favicon.ico
  6. 二進制
      adm/static/fonts/element-icons.535877f.woff
  7. 二進制
      adm/static/fonts/element-icons.732389d.ttf
  8. 二進制
      adm/static/fonts/fontawesome-webfont.674f50d.eot
  9. 二進制
      adm/static/fonts/fontawesome-webfont.af7ae50.woff2
  10. 二進制
      adm/static/fonts/fontawesome-webfont.b06871f.ttf
  11. 二進制
      adm/static/fonts/fontawesome-webfont.fee66e7.woff
  12. 二進制
      adm/static/fonts/iconfont.0e19555.ttf
  13. 二進制
      adm/static/fonts/iconfont.63e8310.woff
  14. 二進制
      adm/static/fonts/iconfont.64c59e8.eot
  15. 2671 0
      adm/static/img/fontawesome-webfont.912ec66.svg
  16. 380 0
      adm/static/img/iconfont.9e4fa84.svg
  17. 二進制
      adm/static/img/logo.87be7c6.png
  18. 二進制
      adm/static/img/upModelGray.2cb0cc4.png
  19. 二進制
      adm/static/img/upModelGreen.76ad6cc.png
  20. 2 0
      adm/static/js/0.4d9f83941309db212cf0.js
  21. 1 0
      adm/static/js/0.4d9f83941309db212cf0.js.map
  22. 14 0
      adm/static/js/app.4060d3fbda1c0619dac7.js
  23. 1 0
      adm/static/js/app.4060d3fbda1c0619dac7.js.map
  24. 2 0
      adm/static/js/manifest.16a4b6389bd53624d129.js
  25. 1 0
      adm/static/js/manifest.16a4b6389bd53624d129.js.map
  26. 912 0
      adm/static/js/vendor.47069072578e2af336fc.js
  27. 1 0
      adm/static/js/vendor.47069072578e2af336fc.js.map
  28. 61 62
      src/components/ready/buildfloor/addBuild.vue
  29. 28 26
      src/components/ready/buildfloor/formItems.vue
  30. 1 1
      src/views/ready/buildfloor/addFloor/index.vue
  31. 14 10
      src/views/ready/buildfloor/index.vue

二進制
adm/favicon.ico


File diff suppressed because it is too large
+ 1 - 0
adm/index.html


File diff suppressed because it is too large
+ 59 - 0
adm/static/css/app.cd26bca471894157aa9dc778892f7c87.css


File diff suppressed because it is too large
+ 1 - 0
adm/static/css/app.cd26bca471894157aa9dc778892f7c87.css.map


二進制
adm/static/favicon.ico


二進制
adm/static/fonts/element-icons.535877f.woff


二進制
adm/static/fonts/element-icons.732389d.ttf


二進制
adm/static/fonts/fontawesome-webfont.674f50d.eot


二進制
adm/static/fonts/fontawesome-webfont.af7ae50.woff2


二進制
adm/static/fonts/fontawesome-webfont.b06871f.ttf


二進制
adm/static/fonts/fontawesome-webfont.fee66e7.woff


二進制
adm/static/fonts/iconfont.0e19555.ttf


二進制
adm/static/fonts/iconfont.63e8310.woff


二進制
adm/static/fonts/iconfont.64c59e8.eot


File diff suppressed because it is too large
+ 2671 - 0
adm/static/img/fontawesome-webfont.912ec66.svg


File diff suppressed because it is too large
+ 380 - 0
adm/static/img/iconfont.9e4fa84.svg


二進制
adm/static/img/logo.87be7c6.png


二進制
adm/static/img/upModelGray.2cb0cc4.png


二進制
adm/static/img/upModelGreen.76ad6cc.png


File diff suppressed because it is too large
+ 2 - 0
adm/static/js/0.4d9f83941309db212cf0.js


File diff suppressed because it is too large
+ 1 - 0
adm/static/js/0.4d9f83941309db212cf0.js.map


File diff suppressed because it is too large
+ 14 - 0
adm/static/js/app.4060d3fbda1c0619dac7.js


File diff suppressed because it is too large
+ 1 - 0
adm/static/js/app.4060d3fbda1c0619dac7.js.map


File diff suppressed because it is too large
+ 2 - 0
adm/static/js/manifest.16a4b6389bd53624d129.js


File diff suppressed because it is too large
+ 1 - 0
adm/static/js/manifest.16a4b6389bd53624d129.js.map


File diff suppressed because it is too large
+ 912 - 0
adm/static/js/vendor.47069072578e2af336fc.js


File diff suppressed because it is too large
+ 1 - 0
adm/static/js/vendor.47069072578e2af336fc.js.map


+ 61 - 62
src/components/ready/buildfloor/addBuild.vue

@@ -19,34 +19,35 @@
         <div
           :key="item.InfoPointCode"
           v-for="item in val"
-          :class="[{'upload-file':item.inputMode == 'F2' ||  item.Path === 'infos.pic'}]"
+          :class="[{'upload-file':item.dataType == 'ATTACHMENT' ||  item.Path === 'infos.pic'}]"
           style="width: 50%;display: inline-block">
 
           <el-form-item
-            :class="{FloorTypeSelect:item.inputMode == 'D1'||item.Unit}"
+            :class="{FloorTypeSelect:item.dataType == 'ENUM'||item.Unit}"
             :label="item.InfoPointName"
             :prop="item.InfoPointCode"
             v-if="all||item.Visible">
             <el-input
-              v-if="item.inputMode == 'B1' || item.inputMode == 'B2'"
+              :disabled="!item.editable"
+              v-if="item.dataType == 'STRING'"
               v-model="form[item.Path]"/>
 
             <el-input
-              v-else-if="item.inputMode == 'A1'||item.inputMode == 'A2'"
+              v-else-if="item.dataType == 'INTEGER' || item.dataType == 'DOUBLE'"
               type="number"
               v-model="form[item.Path]">
               <template slot="append" v-if="item.Unit">{{ item.Unit }}</template>
             </el-input>
 
             <el-select
-              v-else-if="item.inputMode == 'D1' || item.inputMode == 'E2'"
+              v-else-if="item.dataType == 'ENUM' || item.dataType == 'BOOLEAN'"
               placeholder="请选择"
               v-model="form[item.Path]">
               <el-option :key="op.name" :label="op.name" :value="op.code" v-for="op in item.options"></el-option>
             </el-select>
 
             <el-select
-              v-else-if="item.inputMode == 'D2'"
+              v-else-if="item.dataType == 'MENUM'"
               placeholder="请选择"
               v-model="form[item.Path]"
               multiple
@@ -54,41 +55,41 @@
               <el-option :key="op.name" :label="op.name" :value="op.code" v-for="op in item.options"></el-option>
             </el-select>
 
-            <el-date-picker
-              v-else-if="item.inputMode == 'C6'"
-              v-model="form[item.Path]"
-              type="daterange"
-              value-format="yyyy-MM-dd"
-              range-separator="至"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"/>
+            <!--            <el-date-picker-->
+            <!--              v-else-if="item.dataType == 'DATETIME'"-->
+            <!--              v-model="form[item.Path]"-->
+            <!--              type="daterange"-->
+            <!--              value-format="yyyy-MM-dd"-->
+            <!--              range-separator="至"-->
+            <!--              start-placeholder="开始日期"-->
+            <!--              end-placeholder="结束日期"/>-->
 
-            <el-cascader
-              v-else-if="item.inputMode == 'D1L'"
-              placeholder="请选择"
-              :options="item.options"
-              v-model="form[item.Path]"
-              :props="item.props"
-              filterable
-              :show-all-levels="false"
-              clearable
-              style="width: 200px"/>
+            <!--            <el-cascader-->
+            <!--              v-else-if="item.inputMode == 'D1L'"-->
+            <!--              placeholder="请选择"-->
+            <!--              :options="item.options"-->
+            <!--              v-model="form[item.Path]"-->
+            <!--              :props="item.props"-->
+            <!--              filterable-->
+            <!--              :show-all-levels="false"-->
+            <!--              clearable-->
+            <!--              style="width: 200px"/>-->
 
-            <el-input
-              v-else-if="item.inputMode == 'L'||item.inputMode == 'L1'||item.inputMode == 'L2'||item.inputMode == 'M'"
-              v-model="form[item.Path]">
-              <template slot="append" v-if="item.Unit">{{ item.Unit }}</template>
-            </el-input>
+            <!--            <el-input-->
+            <!--              v-else-if="item.inputMode == 'L'||item.inputMode == 'L1'||item.inputMode == 'L2'||item.inputMode == 'M'"-->
+            <!--              v-model="form[item.Path]">-->
+            <!--              <template slot="append" v-if="item.Unit">{{ item.Unit }}</template>-->
+            <!--            </el-input>-->
 
             <el-date-picker
-              v-else-if="item.inputMode == 'C5'" v-model="form[item.Path]"
+              v-else-if="item.dataType == 'DATETIME'"
+              v-model="form[item.Path]"
               placeholder="选择日期"
-              value-format="yyyy-MM-dd"
               type="date">
             </el-date-picker>
 
             <uploadImgs
-              v-else-if="item.inputMode == 'F2'&& item.Path === 'infos.Pic'"
+              v-else-if="item.dataType == 'ATTACHMENT'&& item.Path === 'infos.Pic'"
               :readOnly="false"
               v-model="form[item.Path]"
               :keysArr="Array.isArray(buildData[item.Path]) ? buildData[item.Path]:[]"
@@ -97,7 +98,7 @@
               @change="changeItem"/>
 
             <upload-files
-              v-else-if="item.inputMode == 'F2'"
+              v-else-if="item.dataType == 'ATTACHMENT'"
               v-model="form[item.Path]"
               :readOnly="false"
               :isShow="1"
@@ -106,8 +107,6 @@
               :context-key="item.Path"
               @change="changeItem"/>
 
-            <el-input disabled title="暂不支持" v-else v-model="form[item.Path]"/>
-
           </el-form-item>
         </div>
       </template>
@@ -187,20 +186,20 @@ export default {
       //获取信息
       let buildData = data || {};  // string =>array key
       buildData = flattenKeys(buildData);
-      for (let key in this.buildMessage) {
-        let arr = this.buildMessage[key];
-        if (Array.isArray(arr)) {
-          let list = arr.filter(i => i.inputMode == 'D2' || i.inputMode == 'C6');
-          list.forEach(j => {
-            if (buildData.hasOwnProperty(j.Path)) {
-              if (!Array.isArray(buildData[j.Path])) {
-                buildData[j.Path] = buildData[j.Path].split(',');
-              }
-            }
-
-          })
-        }
-      }
+      // for (let key in this.buildMessage) {
+      //   let arr = this.buildMessage[key];
+      //   if (Array.isArray(arr)) {
+      //     let list = arr.filter(i => i.dataType == 'MENUM' || i.dataType == 'DATETIME');
+      //     list.forEach(j => {
+      //       if (buildData.hasOwnProperty(j.Path)) {
+      //         if (!Array.isArray(buildData[j.Path])) {
+      //           buildData[j.Path] = buildData[j.Path].split(',');
+      //         }
+      //       }
+      //
+      //     })
+      //   }
+      // }
       this.buildData = buildData;
       this.timeoutSetVal()
       this.buildDialogVis = true
@@ -223,19 +222,19 @@ export default {
       this.$refs[formName].validate((valid) => {
         if (valid) {
           this.buildDisabled = true
-          for (let key in this.buildMessage) {
-            let arr = this.buildMessage[key];
-            if (Array.isArray(arr)) {
-              let list = arr.filter(i => i.inputMode == 'D2' || i.inputMode == 'C6');
-              list.forEach(j => {
-                if (this.form.hasOwnProperty(j.Path)) {
-                  if (Array.isArray(this.form[j.Path])) {
-                    this.form[j.Path] = this.form[j.Path].join(',');
-                  }
-                }
-              })
-            }
-          }
+          // for (let key in this.buildMessage) {
+          //   let arr = this.buildMessage[key];
+          //   if (Array.isArray(arr)) {
+          //     let list = arr.filter(i => i.inputMode == 'D2' || i.inputMode == 'C6');
+          //     list.forEach(j => {
+          //       if (this.form.hasOwnProperty(j.Path)) {
+          //         if (Array.isArray(this.form[j.Path])) {
+          //           this.form[j.Path] = this.form[j.Path].join(',');
+          //         }
+          //       }
+          //     })
+          //   }
+          // }
           this.$emit('handleBuild', this.form)
           setTimeout(() => {
             this.buildDisabled = false

+ 28 - 26
src/components/ready/buildfloor/formItems.vue

@@ -6,7 +6,7 @@
           :label="item.name"
           :prop="item.code"
           v-if="all||item.visible"
-          :class="{FloorTypeSelect:item.inputMode == 'D1'||item.unit}">
+          :class="{FloorTypeSelect:item.dataType == 'ENUM'||item.unit}">
 
           <el-input
             v-model="form[item.path]"
@@ -41,47 +41,49 @@
           </span>
 
           <!--/二维码相关-->
-          <span v-else-if="item.inputMode == 'B1'">
+          <span v-else-if="item.dataType == 'STRING'">
             <el-input v-model="form[item.path]"
-                      :placeholder="(item.inputMode === 'B1' && item.path==='localId') ? '填写示例:F1、B1?':'' "/>
-              <div v-if="item.inputMode === 'B1' && item.path==='localId' && isShowTitle"
+                      :disabled="!item.editable"
+                      :placeholder="(item.dataType == 'STRING' && item.path==='localId') ? '填写示例:F1、B1?':'' "/>
+              <div v-if="item.dataType == 'STRING' && item.path==='localId' && isShowTitle"
                    style="color: gray;font-size: 12px">
                 用于楼层平面图切换
               </div>
           </span>
 
-          <el-input v-model="form[item.path]" v-else-if="item.inputMode == 'A1'||item.inputMode == 'A2'" type="number">
+          <el-input v-model="form[item.path]" v-else-if="item.dataType == 'INTEGER'||item.dataType == 'DOUBLE'"
+                    type="number">
             <template slot="append" v-if="item.unit">{{ item.unit }}</template>
           </el-input>
 
-          <el-select v-model="form[item.path]" placeholder="请选择" v-else-if="item.inputMode == 'D1'">
+          <el-select v-model="form[item.path]" placeholder="请选择" v-else-if="item.dataType == 'ENUM'">
             <el-option v-for="op in item.options" :key="op.code" :label="op.name" :value="op.code"></el-option>
           </el-select>
 
-          <el-cascader
-            v-else-if="item.inputMode == 'D1L'"
-            placeholder="请选择"
-            :options="item.options"
-            v-model="form[item.path]"
-            :props="item.props"
-            filterable
-            :show-all-levels="false"
-            clearable
-            style="width: 200px"/>
+          <!--          <el-cascader-->
+          <!--            v-else-if="item.inputMode == 'D1L'"-->
+          <!--            placeholder="请选择"-->
+          <!--            :options="item.options"-->
+          <!--            v-model="form[item.path]"-->
+          <!--            :props="item.props"-->
+          <!--            filterable-->
+          <!--            :show-all-levels="false"-->
+          <!--            clearable-->
+          <!--            style="width: 200px"/>-->
 
-          <el-input
-            v-else-if="item.inputMode == 'L'||item.inputMode == 'L1'||item.inputMode == 'L2'||item.inputMode == 'M'"
-            v-model="form[item.path]">
-            <template slot="append" v-if="item.unit">{{ item.unit }}</template>
-          </el-input>
-          <el-input v-model="form[item.path]" v-else disabled title="暂不支持" :placeholder="item.inputMode?'':'字典无输入类型'"></el-input>
+          <!--                    <el-input-->
+          <!--                      v-else-if="item.inputMode == 'L'||item.inputMode == 'L1'||item.inputMode == 'L2'||item.inputMode == 'M'"-->
+          <!--                      v-model="form[item.path]">-->
+          <!--                      <template slot="append" v-if="item.unit">{{ item.unit }}</template>-->
+          <!--                    </el-input>-->
+          <el-input v-model="form[item.path]" v-else :placeholder="item.inputMode?'':'字典无输入类型'"></el-input>
         </el-form-item>
       </div>
     </el-form>
   </div>
 </template>
 <script>
-import {getDataDictionary} from "@/api/dict";
+import { getDataDictionary } from "@/api/dict";
 
 export default {
   props: {
@@ -134,10 +136,10 @@ export default {
       };
       getDataDictionary(params, res => {
         let arr = res.content.map(item => {
-          if ((item.inputMode === 'D1' || item.inputMode === 'D2' || item.inputMode === 'E2' || item.inputMode === 'D1L') && item.dataSource) {
-            // item.options = JSON.parse(item.dataSource)
+          const category = ['ENUM', 'MENUM', 'BOOLEAN']
+          if (item.category == 'STATIC' && item.dataType.includes(category) && item.dataSource) {
             item.options = item.dataSource
-            if (item.options[0] && item.options[0].content) {
+            if (item.options[0]) {
               item.props = {
                 value: 'code',
                 label: 'name',

+ 1 - 1
src/views/ready/buildfloor/addFloor/index.vue

@@ -10,7 +10,7 @@
   </el-dialog>
 </template>
 <script>
-import {manageCreateFloor, manageUpdateFloor} from "@/api/object/floor";
+import { manageCreateFloor, manageUpdateFloor } from "@/api/object/floor";
 import formItems from "@/components/ready/buildfloor/formItems";
 import tools from "@/utils/buildfloor/tools";
 

+ 14 - 10
src/views/ready/buildfloor/index.vue

@@ -224,16 +224,17 @@ export default {
         //一级循环出来一级标签
         let list = res.content.filter(i => (i.firstName !== '工作历') && (i.firstName !== '能耗信息') && (i.firstName !== '人员信息'))
         list.map(item => {
-          if ((item.inputMode === 'D1' || item.inputMode === 'D2' || item.inputMode === 'E2' || item.inputMode === 'D1L') && item.dataSource) {
-            // item.options = JSON.parse(item.dataSource)
+          console.table(item.category, item.dataType)
+          const category = ['ENUM', 'MENUM', 'BOOLEAN']
+          // if ((item.inputMode === 'D1' || item.inputMode === 'D2' || item.inputMode === 'E2' || item.inputMode === 'D1L') && item.dataSource) {
+          // item.options = JSON.parse(item.dataSource)
+          if (item.category == 'STATIC' && item.dataType.includes(category) && item.dataSource) {
             item.options = item.dataSource
-            if (item.options[0] && item.options[0].content) {
-              item.props = {
-                value: 'code',
-                label: 'name',
-                children: 'content',
-                checkStrictly: true
-              }
+            item.props = {
+              value: 'code',
+              label: 'name',
+              children: 'content',
+              checkStrictly: true
             }
           }
           if (first[item.firstName] && first[item.firstName].length) {
@@ -251,7 +252,10 @@ export default {
               options: item.dataSource,
               props: item.props,
               Unit: item.unit,
-              Path: item.path
+              Path: item.path,
+              dataType: item.dataType,
+              category: item.category,
+              editable: item.editable
             })
           }
         })