Browse Source

修改街道

“yueshang” 1 năm trước cách đây
mục cha
commit
10cd1c7289
2 tập tin đã thay đổi với 21 bổ sung22 xóa
  1. 19 22
      src/components/choiceOrange/index.vue
  2. 2 0
      src/views/backend/remindInfo/index.vue

+ 19 - 22
src/components/choiceOrange/index.vue

@@ -49,18 +49,10 @@
           @selection-change="handleSelectionChange"
         >
           <el-table-column type="selection" width="100"> </el-table-column>
-          <el-table-column label="序号" type="index"  width="100"/>
-          <el-table-column
-            label="组织名称"
-            prop="name"
-            v-if="clickType == 2"
-          >
+          <el-table-column label="序号" type="index" width="100" />
+          <el-table-column label="组织名称" prop="deptName" v-if="clickType == 2">
           </el-table-column>
-          <el-table-column
-            label="组织名称"
-            prop="qumc"
-            v-if="clickType == 3"
-          >
+          <el-table-column label="组织名称" prop="qumc" v-if="clickType == 3">
           </el-table-column>
         </el-table>
         <!-- 分页组件 -->
@@ -103,7 +95,7 @@
           @selection-change="RighthandleSelectionChange"
         >
           <el-table-column type="selection" width="100"> </el-table-column>
-          <el-table-column label="序号" type="index"  width="100"/>
+          <el-table-column label="序号" type="index" width="100" />
           <el-table-column label="组织名称" prop="deptName"
             ><template v-slot="scope">
               <span v-if="scope.row.deptName">{{ scope.row.deptName }}</span>
@@ -191,10 +183,14 @@ export default {
       type: Number,
       default: 2,
     },
-    open:{
-        type:Boolean,
-        default:false
-    }
+    open: {
+      type: Boolean,
+      default: false,
+    },
+    userType: {
+      type: Number,
+      default: false,
+    },
   },
   watch: {
     userId: {
@@ -216,9 +212,9 @@ export default {
     open: {
       //深度监听
       handler(newV, oldV) {
-        if(!newV){
-            this.alreadySelectedOrgList = [];
-            this.leftSelectedOrgList = [];
+        if (!newV) {
+          this.alreadySelectedOrgList = [];
+          this.leftSelectedOrgList = [];
         }
       },
       deep: true,
@@ -229,16 +225,17 @@ export default {
     /** 获取消防大队和街道的数据 */
     getDeptData() {
       // 获取大队数据
+      this.leftDataList = null;
       if (this.clickType == 2) {
         getFireTeams(this.userId).then((res) => {
           this.orgloading = false;
-          this.leftDataList = res.data;
+          this.leftDataList = res.data.records;
         });
       } else if (this.clickType == 3) {
         console.log("this.clickType", this.clickType);
         this.queryParamsStreet.userId = this.$store.state.user.id;
-        this.queryParamsStreet.sjxfjg = this.$store.state.user.deptid;
-        console.log("-------------",this.queryParamsStreet.sjxfjg)
+        this.queryParamsStreet.sjxfjg = this.userType;
+        console.log("-------------", this.queryParamsStreet.sjxfjg);
         // this.form.deptId
         getStreetPage(this.queryParamsStreet).then((response) => {
           this.orgloading = false;

+ 2 - 0
src/views/backend/remindInfo/index.vue

@@ -313,6 +313,7 @@
           :type="'comInfo'"
           :clickType="clickType"
           :open="open"
+          :userType="userType"
         ></choiceOrange>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -549,6 +550,7 @@ export default {
       getUserProfile().then((response) => {
         this.form.deptId = response.data ? response.data.dept.id : "";
         this.userType = this.form.deptId;
+        console.log('this.userType', this.userType)
         getuserinfo(response.data.id)
           .then((res) => {
             this.streetId = res.data.streetInfo.id;