billisme 4 vuotta sitten
vanhempi
commit
09ddca3a40

+ 10 - 0
src/components/select-dialog/select-dialog-residential.vue

@@ -50,6 +50,16 @@
         default: false
       },
     },
+    created() {
+      const tenantType = localStorage.getItem("tenantType");
+      if (tenantType == 0){
+        this.column.children.column[0].label = "所属社区"
+        this.column.children.column[1].label = "所属小区"
+      }else if (tenantType == 1){
+        this.column.children.column[0].label = "所属园区"
+        this.column.children.column[1].label = "所属区域"
+      }
+    },
     methods: {
       formatter(row){
         if(!row.name) return '';

+ 3 - 0
src/util/validator.js

@@ -24,6 +24,9 @@ export function validateIdcard(rule, value, callback) {
  * @param {*} callback
  */
 export function validatedEmail(rule,value,callback){
+  if (value == '' || value == undefined || value == null) {
+    callback();
+  }
   if(validateEmail(value)){
     callback();
   }else{

+ 2 - 0
src/views/device/doordevice.vue

@@ -313,8 +313,10 @@ export default {
     const tenantType = localStorage.getItem("tenantType");
     if (tenantType == 0){
       this.option.column[2].label = "所属小区"
+      this.option.column[2].rules[0].message = "请选择所属小区"
     }else if (tenantType == 1){
       this.option.column[2].label = "所属区域"
+      this.option.column[2].rules[0].message = "请选择所属区域"
     }
   },
   /*mounted() {

+ 1 - 1
src/views/device/elevatoralarmsetting.vue

@@ -263,7 +263,7 @@
       },
       subscribeSubmit(webHookUrl){
         if (!webHookUrl){
-          this.$confirm("取消订阅后,将不再收到电梯告警通知!确定取消搞定订阅?", {
+          this.$confirm("取消订阅后,将不再收到电梯告警通知!确定取消告警订阅?", {
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             type: "warning"

+ 9 - 1
src/views/enterprise/dept.vue

@@ -88,11 +88,19 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "所属企业",
+              prop: "enterpriseName",
+              editDisplay: false,
+              addDisplay: false,
+            },
             {
               label: "企业",
               prop: "enterpriseId",
               type:'select',
-              dicUrl:'/api/cyzh-enterprise/enterprise/list?size=500',
+              dicUrl:'/api/cyzh-enterprise/enterprise/list?size=100&enterpriseName={{key}}',
+              filterable: true,
+              remote: true,
               props: {
                 label: "enterpriseName",
                 value: "id"

+ 10 - 1
src/views/enterprise/project.vue

@@ -103,6 +103,7 @@
             {
               label: "项目就业人数",
               prop: "employmentNumber",
+              labelWidth: 100,
               rules: [{
                 required: false,
                 message: "请输入项目就业人数",
@@ -112,8 +113,9 @@
               }]
             },
             {
-              label: "研发人员数",
+              label: "研发人员数",
               prop: "researchNumber",
+              labelWidth: 100,
               rules: [{
                 required: false,
                 message: "请输入研发人员人数",
@@ -125,6 +127,7 @@
             {
               label: "项目投资总额",
               prop: "investmentAmount",
+              labelWidth: 100,
               rules: [{
                 required: false,
                 message: "请输入项目投资总额",
@@ -136,6 +139,7 @@
             {
               label: "项目投资收益",
               prop: "investmentReturn",
+              labelWidth: 100,
               rules: [{
                 required: false,
                 message: "请输入项目投资收益",
@@ -147,6 +151,7 @@
             {
               label: "已完成投资总额",
               prop: "investmentCompleted",
+              labelWidth: 120,
               rules: [{
                 required: false,
                 message: "请输入已完成投资总额",
@@ -158,6 +163,7 @@
             {
               label: "项目研发费用",
               prop: "researchCost",
+              labelWidth: 100,
               rules: [{
                 required: false,
                 message: "请输入项目研发费用",
@@ -169,6 +175,7 @@
             {
               label: "项目上缴税金",
               prop: "taxes",
+              labelWidth: 100,
               rules: [{
                 required: false,
                 message: "请输入项目上缴税金",
@@ -180,6 +187,7 @@
             {
               label: "已申请奖补金额",
               prop: "taward",
+              labelWidth: 120,
               rules: [{
                 required: false,
                 message: "请输入已申请奖补金额",
@@ -191,6 +199,7 @@
             {
               label: "已发放奖补金额",
               prop: "tawardCompleted",
+              labelWidth: 120,
               rules: [{
                 required: false,
                 message: "请输入已发放奖补金额",

+ 11 - 9
src/views/enterprise/staff.vue

@@ -82,7 +82,7 @@
               searchFilterable: true,
               filterable: true,
               remote: true,
-              dicUrl: '/api/cyzh-enterprise/enterprise/list?size=100',
+              dicUrl: '/api/cyzh-enterprise/enterprise/list?size=100&enterpriseName={{key}}',
               dicFormatter: (res)=>{
                 return res.data.records;
               },
@@ -165,10 +165,8 @@
               rules: [{
                 required: false,
                 message: "请输入邮箱",
-                trigger: "blur"
-              },{
-                validator: validatedEmail,
-                trigger: "blur"
+                trigger: "blur",
+                validator: validatedEmail
               }]
             },
             {
@@ -197,10 +195,8 @@
               rules: [{
                 required: false,
                 message: "请输入手机",
-                trigger: "blur"
-              },{
-                validator: validatePhone,
-                trigger: "blur"
+                trigger: "blur",
+                validator: validatePhone
               }]
             },
             {
@@ -463,6 +459,9 @@
     },
     methods: {
       rowSave(row, done, loading) {
+        if(row.$enterpriseId){
+          row.enterpriseName = row.$enterpriseId;
+        }
         if (row.avatar.length == 0) {
           row.avatar = '';
         }
@@ -479,6 +478,9 @@
         });
       },
       rowUpdate(row, index, done, loading) {
+        if(row.$enterpriseId){
+          row.enterpriseName = row.$enterpriseId;
+        }
         update(row).then(() => {
           this.onLoad(this.page);
           this.$message({

+ 13 - 8
src/views/estate/accessrecord.vue

@@ -276,13 +276,11 @@
               }]
             },
             // {
-            //   label: "机构名称",
+            //   label: "所属社区",
             //   prop: "agencyName",
-            //   rules: [{
-            //     required: true,
-            //     message: "请输入机构名称",
-            //     trigger: "blur"
-            //   }]
+            //   hide: true,
+            //   editDisplay: false,
+            //   addDisplay: false
             // },
             {
               label: "设备mac码",
@@ -339,12 +337,19 @@
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0){
         //社区
+        let residentialNameProp = this.findObject(this.option.column,"residentialName");
+        // let agencyNameProp = this.findObject(this.option.column,"agencyName");
         this.option.column[1].label="所属社区";
-        // this.option.column.splice(2,0,this.residentialColumn)
+        residentialNameProp.label="小区名称";
+        // agencyNameProp.label="所属社区";
       }else if (tenantType == 1){
         //园区
-        this.option.column[1].label = "所属区域";
+        let residentialNameProp = this.findObject(this.option.column,"residentialName");
+        // let agencyNameProp = this.findObject(this.option.column,"agencyName");
+        this.option.column[1].label = "所属园区";
         this.option.column.splice(2,0,this.enterpriseColumn)
+        residentialNameProp.label="区域名称";
+        // agencyNameProp.label="所属园区";
       }
     },
     methods: {

+ 22 - 6
src/views/estate/parkinglot.vue

@@ -129,8 +129,8 @@
               },
               rules: [{
                 required: true,
-                message: "请输入所属社区id",
-                trigger: "blur"
+                message: "请输入所属社区",
+                trigger: "change"
               }],
               hide: true,
               viewDisplay: false,
@@ -368,11 +368,27 @@
     created() {
       const tenantType = localStorage.getItem("tenantType");
       if (tenantType == 0){
-        this.option.column[3].label = "所属社区"
-        this.option.column[5].label = "所属小区"
+        let agencyIdProp = this.findObject(this.option.column,"agencyId");
+        let agencyNameProp = this.findObject(this.option.column,"agencyName");
+        let residentialIdProp = this.findObject(this.option.column,"residentialId");
+        let residentialNameProp = this.findObject(this.option.column,"residentialName");
+        agencyIdProp.label = "所属社区"
+        agencyIdProp.rules[0].message = "请选择所属社区"
+        agencyNameProp.label = "所属社区"
+        residentialIdProp.label = "所属小区"
+        residentialIdProp.rules[0].message = "请选择所属小区"
+        residentialNameProp.label = "所属小区"
       }else if (tenantType == 1){
-        this.option.column[3].label = "所属园区"
-        this.option.column[5].label = "所属区域"
+        let agencyIdProp = this.findObject(this.option.column,"agencyId");
+        let agencyNameProp = this.findObject(this.option.column,"agencyName");
+        let residentialIdProp = this.findObject(this.option.column,"residentialId");
+        let residentialNameProp = this.findObject(this.option.column,"residentialName");
+        agencyIdProp.label = "所属园区"
+        agencyIdProp.rules[0].message = "请选择所属园区"
+        agencyNameProp.label = "所属园区"
+        residentialIdProp.label = "所属区域"
+        residentialIdProp.rules[0].message = "请选择所属区域"
+        residentialNameProp.label = "所属区域"
       }
     },
     watch: {

+ 2 - 8
src/views/estate/parkingspace.vue

@@ -37,7 +37,6 @@
 
 <script>
   import {getList, getDetail, add, update, remove} from "@/api/estate/parkingspace";
-  import {getList as getResidentialList} from "@/api/community/residential";
   import {mapGetters} from "vuex";
   import SelectDialogResidential from "../../components/select-dialog/select-dialog-residential";
 
@@ -173,6 +172,7 @@
             //     trigger: "blur"
             //   }]
             // },
+
             {
               label: "所属车场",
               prop: "parkingLotId",
@@ -245,19 +245,13 @@
         this.option.column[4].label = "所属区域"
       }
     },
-    watch: {
-      /*"form.residentialId"() {
-        getResidentialList(1, 10, {id: this.form.residentialId}).then(res => {
-          this.form.residentialName = res.data.data.records[0].name;
-        })
-      }*/
-    },
     methods: {
       selectCallback(row){
         this.form.residentialId = row.id;
         this.form.residentialName = row.name;
         if (this.option.column[5].prop == 'parkingLotId' && this.option.column[5].dicUrl.indexOf('residentialId') == -1){
           this.option.column[5].dicUrl += '?residentialId=' + this.form.residentialId + '&size=100';
+
         }
       },
       rowSave(row, done, loading) {

+ 4 - 3
src/views/party/activity.vue

@@ -135,11 +135,12 @@
               type: 'upload',
               hide: true,
               row: true,
+              listType: 'picture-img',
+              action: '/api/blade-resource/oss/endpoint/put-file',
               propsHttp: {
-                url: 'data'
+                res: 'data',
+                url: 'link',
               },
-              listType: 'picture-img',
-              action: "/api/upload/putfile",
               display: true
             },
             // {

+ 4 - 3
src/views/party/meeting.vue

@@ -120,11 +120,12 @@
               type: 'upload',
               hide: true,
               row: true,
+              listType: 'picture-img',
+              action: '/api/blade-resource/oss/endpoint/put-file',
               propsHttp: {
-                url: 'data'
+                res: 'data',
+                url: 'link',
               },
-              listType: 'picture-img',
-              action: "/api/upload/putfile",
               display: true
             },
             // {

+ 4 - 3
src/views/party/news.vue

@@ -123,11 +123,12 @@
               type: 'upload',
               hide: true,
               row: true,
+              listType: 'picture-img',
+              action: '/api/blade-resource/oss/endpoint/put-file',
               propsHttp: {
-                url: 'data'
+                res: 'data',
+                url: 'link',
               },
-              listType: 'picture-img',
-              action: "/api/upload/putfile",
               display: true
             },
             // {