Browse Source

Merge branch 'dataType' of git.sagacloud.cn:web/adm into dataType

zhangyu 3 years ago
parent
commit
03929d5ec4

+ 5 - 5
src/framework/layout/layout-store.js

@@ -26,7 +26,7 @@ export default {
     },
     projectId: '',
     group_code: '',
-    projects: project["14"],
+    projects: project["39"],
     breadcrumb: [],
     uploaderList: [], //当前上传文件列表
     secret: "saga123456", //项目密码
@@ -81,7 +81,7 @@ export default {
     setSidebarSelected: (state, val) => {
       state.sidebarSelected = val
       storage.set(KEY_MENU_SELECTED, val)
-      lStorage.set('screen_data', {path: val, data: {}})
+      lStorage.set('screen_data', { path: val, data: {} })
     },
     setprojectId: (state, val) => {
       lStorage.remove('cacheInfo') //待删除(删除用户浏览器无用缓存)
@@ -118,14 +118,14 @@ export default {
     setErrorReport(contentx, value) {
       contentx.commit('setErrorReport', value)
     },
-    loadUserInfo({state}) {
+    loadUserInfo({ state }) {
       console.log(state)
       // 获取 userInfo 信息
       return new Promise((resolve, reject) => {
         frameworkApi.loadUserInfo().then(resp => {
           console.log(resp)
           if (resp.Result == 'success' && resp.UserId) {
-            state.userInfo = {userName: resp.Username, userId: resp.UserId}
+            state.userInfo = { userName: resp.Username, userId: resp.UserId }
             state.userId = resp.UserId
             storage.set('user_name', resp.Username)
             storage.set('user_id', resp.UserId)
@@ -158,7 +158,7 @@ export default {
     },
     setBreadcrumb: {
       root: true,
-      handler({state, commit}, val) {
+      handler({ state, commit }, val) {
         let label = val[0].label;
         if (label === "消息中心") {
           commit("setSidebarSelected", "message"); // 当进入消息中心页面的时候不选中导航栏

+ 5 - 2
src/views/ledger/cenotelist/cenoteadd/index.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click="handleCreateTableData">创建竖井</el-button>
+      <el-button type="primary" size="medium" @click="handleCreateTableData" :disabled="createDisable">创建竖井</el-button>
     </el-row>
   </div>
 </template>
@@ -64,7 +64,8 @@ export default {
       showType: this.$route.query.showType,
       tableHeader: [],
       tableData: session.get("cenoteAddData") ? session.get("cenoteAddData").length ? session.get("cenoteAddData") : [{}] : [{}],
-      copyTableData: []
+      copyTableData: [],
+      createDisable: false
     };
   },
   computed: {
@@ -126,7 +127,9 @@ export default {
         return
       }
       params.content = newData
+      this.createDisable = true
       await createCenoteTableData(params, (res) => {
+        this.createDisable = false
         this.$message.success("添加成功!")
         session.remove("cenoteAddData")
         this.$router.push({ name: 'cenotelist' })

+ 1 - 1
src/views/ledger/facility/addfacility.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click.once="handleCreateTableData" class="create_button" :disabled="createDisable">创建设备</el-button>
+      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button" :disabled="createDisable">创建设备</el-button>
     </el-row>
     <!-- 二维码弹窗 -->
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>

+ 5 - 3
src/views/ledger/facility/partsmanage/addparts/index.vue

@@ -29,7 +29,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button">创建部件</el-button>
+      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button" :disabled="createDisable">创建部件</el-button>
     </el-row>
     <!-- 二维码弹窗 -->
     <qrcode :dialog="myDialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
@@ -140,7 +140,8 @@ export default {
       graphyId: null,
       id: 0,
       EquipmentList: [],
-      firmId: "" //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
+      firmId: "", //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
+      createDisable: false
     };
   },
   computed: {
@@ -226,7 +227,7 @@ export default {
           cascade: [],
           content: [newData[i]]
         }
-
+        this.createDisable = true
         await createPart(param, async res => {
           if (newData[i].Checked) {//同时创建资产
             param.content[0].equipmentId = res.entityList[0].id
@@ -235,6 +236,7 @@ export default {
             })
           }
           if (i == newData.length - 1) {
+            this.createDisable = false
             this.$message.success('创建成功')
             session.remove("partsAddData")
             this.$router.push({

+ 5 - 2
src/views/ledger/property/addproperty.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click.prevent.once="handleCreateTableData" class="create_button">创建资产</el-button>
+      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button" :disabled="createDisable">创建资产</el-button>
     </el-row>
     <upload-files-dialog :read="onlyRead ? true : false" ref="upload" @changeFile="fileChange" :keysArr="filesArr"
                          :dialog="myDialog"></upload-files-dialog>
@@ -101,7 +101,8 @@ export default {
       graphyId: null,
       id: 0,
       showType: this.$route.query.showType,
-      EquipmentList: []
+      EquipmentList: [],
+      createDisable: false
     };
   },
   computed: {
@@ -175,7 +176,9 @@ export default {
         return;
       }
       params.content = newData
+      this.createDisable = true;
       await createPropertyData(params, res => {
+        this.createDisable = false;
         this.$message.success("添加成功!")
         session.remove("propertyAddData")
         this.$router.push({

+ 5 - 2
src/views/ledger/rentlist/rentadd/index.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center create_button">
-      <el-button type="primary" size="medium" @click="handleCreateTableData">创建租户</el-button>
+      <el-button type="primary" size="medium" @click="handleCreateTableData" :disabled="createDisable">创建租户</el-button>
     </el-row>
   </div>
 </template>
@@ -65,7 +65,8 @@ export default {
       showType: this.$route.query.showType,
       tableHeader: [],
       tableData: session.get("rentAddData") ? session.get("rentAddData").length ? session.get("rentAddData") : [{}] : [{}],
-      copyTableData: []
+      copyTableData: [],
+      createDisable: false
     };
   },
   computed: {
@@ -122,7 +123,9 @@ export default {
         return
       }
       params.Content = newData
+      this.createDisable = true
       await createRentTableData(params, (res) => {
+        this.createDisable = false
         this.$message.success("添加成功!")
         session.remove("rentAddData")
         this.$router.push({ name: 'rentlist' })

+ 1 - 1
src/views/ledger/spacelist/spaceadd/index.vue

@@ -161,7 +161,6 @@ export default {
     },
     // 创建业务空间数据
     async handleCreateTableData() {
-      this.createDisable = true;
       let newData = this.tableData.filter(item => {
         let keys = Object.keys(item);
         keys.map(key => {
@@ -202,6 +201,7 @@ export default {
       let param = {
         content: newData
       }
+      this.createDisable = true;
       zoneCreate(param, res => {
         this.createDisable = false;
         this.$message.success('创建成功')

+ 4 - 1
src/views/ledger/system/addsystem.vue

@@ -22,7 +22,7 @@
       </div>
     </div>
     <el-row class="center">
-      <el-button type="primary" size="medium" @click.prevent.once="handleCreateTableData" class="create_button">创建系统</el-button>
+      <el-button type="primary" size="medium" @click="handleCreateTableData" class="create_button" :disabled="createDisable">创建系统</el-button>
     </el-row>
 
     <!-- 关联楼层 -->
@@ -99,6 +99,7 @@ export default {
       id: 0,
       showType: this.$route.query.showType,
       EquipmentList: [],
+      createDisable: false
     };
   },
   computed: {
@@ -181,7 +182,9 @@ export default {
         return;
       }
       params.content = newData
+      this.createDisable = true;
       createSystemBuildFloor(params, res => {
+        this.createDisable = false;
         this.$message.success('创建成功')
         session.remove("systemAddData")
         this.$router.push({

+ 1 - 0
src/views/model/report/index.vue

@@ -267,6 +267,7 @@ export default {
           this.tableList = res.Content;
           if (this.tableList && this.tableList.length) {
             this.tableList.forEach((item, index) => {
+              item.flag = true;
               item.Code = item.Id;
             })
             this.activeTab = this.tableList[0].Code;// 默认选中第一个模型文件夹