فهرست منبع

调整机构用户

luojun 2 سال پیش
والد
کامیت
0c17411c05
2فایلهای تغییر یافته به همراه158 افزوده شده و 108 حذف شده
  1. 145 106
      src/views/system/dept/extend.vue
  2. 13 2
      src/views/system/dept/index.vue

+ 145 - 106
src/views/system/dept/extend.vue

@@ -21,7 +21,7 @@
       </el-descriptions>
     </div>
 
-    <h3  v-if="type == 4" class="title">补充基础信息</h3>  
+    <h3 v-if="type == 4" class="title">补充基础信息</h3>
     <div class="info-box">
       <el-form
         inline
@@ -125,21 +125,45 @@
     <div v-if="type == 4" class="info-box">
       <!--  下拉框选择    -->
       <div>
-        <el-switch
+        <span>是否自有产权</span>
+        <el-select style="margin-left: 30px;"
+                v-model="ownership"
+                placeholder="是否自有产权"
+              >
+                <el-option
+                  v-for="dict in dict.type.org_extend_is"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+        <!-- <el-switch
           v-model="ownership"
           active-text
           inactive-text="是否自有产权"
           :active-value="1"
           :inactive-value="0"
-        ></el-switch>
-        <el-switch
+        ></el-switch> -->
+        <!-- <el-switch
           style="margin-left: 50px"
           v-model="outsideArea"
           active-text
           inactive-text="是否区域外"
           :active-value="1"
           :inactive-value="0"
-        ></el-switch>
+        ></el-switch> -->
+        <span style="margin-left: 209px;">是否区域外</span>
+        <el-select style="margin-left: 45px;"
+                v-model="outsideArea"
+                placeholder="是否区域外"
+              >
+                <el-option
+                  v-for="dict in dict.type.org_extend_is"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
       </div>
       <!--  表格   -->
       <div style="margin-top: 30px">
@@ -167,13 +191,12 @@
             v-if="false"
           />
           <el-table-column type="index" label="序号" align="center" prop="id" />
-          <el-table-column label="标准" align="center" prop="standard" >
+          <el-table-column label="标准" align="center" prop="standard">
             <template slot-scope="r"
               >{{
                 getLabel(dict.type.org_extend_standard, `${r.row.standard}`)
               }}
             </template>
-
           </el-table-column>
           <el-table-column
             label="达标日期"
@@ -212,7 +235,7 @@
           >
             <template slot-scope="scope">
               <el-button
-              v-if="scope.row.certificate"
+                v-if="scope.row.certificate"
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -253,7 +276,12 @@
         <el-row v-if="askari">
           <el-col :span="12" :xs="24">
             <p style="font-size: 12px; color: #999">上传保安证</p>
-            <image-upload :value="askariCertificate" :fileSize="2" :type="'alone'" @input="getImgUrl"></image-upload>
+            <image-upload
+              :value="askariCertificate"
+              :fileSize="2"
+              :type="'alone'"
+              @input="getImgUrl"
+            ></image-upload>
 
             <!--            <el-image class="zoom-image border-color-change" :src="uploadp" fit="contain" @click="triggerFileInput"></el-image>-->
             <!--            <input type="file"-->
@@ -263,23 +291,24 @@
           </el-col>
           <el-col :span="12" :xs="24">
             <p style="font-size: 12px; color: #999">示例图</p>
-            <div style="width: 350px;">
-                <el-image :src="uplp"></el-image>
-              </div>
+            <div style="width: 350px">
+              <el-image :src="uplp"></el-image>
+            </div>
             <!--            <el-image class="zoom-image border-color-change" :src="uplp" fit="contain"></el-image>-->
           </el-col>
         </el-row>
       </div>
     </div>
-    <el-switch v-if="type == 4"
-    style="margin-top: 30px"
-          v-model="businessLibrary"
-          active-text
-          inactive-text="是否有业务库"
-          :active-value="1"
-          :inactive-value="0"
-        ></el-switch>
-    <div v-if="type == 4&businessLibrary>0" style="margin-top: 30px">
+    <el-switch
+      v-if="type == 4"
+      style="margin-top: 30px"
+      v-model="businessLibrary"
+      active-text
+      inactive-text="是否有业务库"
+      :active-value="1"
+      :inactive-value="0"
+    ></el-switch>
+    <div v-if="(type == 4) & (businessLibrary > 0)" style="margin-top: 30px">
       <h3 class="title">业务库信息</h3>
       <div class="info-box">
         <el-form inline label-position="left" label-width="100px">
@@ -343,13 +372,15 @@
             align="center"
           />
           <el-table-column type="index" label="序号" align="center" prop="id" />
-          <el-table-column label="标准" align="center" prop="standard" >
+          <el-table-column label="标准" align="center" prop="standard">
             <template slot-scope="r"
               >{{
-                getLabel(dict.type.org_extend_business_library_standard, `${r.row.standard}`)
+                getLabel(
+                  dict.type.org_extend_business_library_standard,
+                  `${r.row.standard}`
+                )
               }}
             </template>
-
           </el-table-column>
           <el-table-column
             label="达标日期"
@@ -389,7 +420,7 @@
           >
             <template slot-scope="scope">
               <el-button
-              v-if="scope.row.certificate"
+                v-if="scope.row.certificate"
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -418,26 +449,28 @@
         </el-table>
       </div>
     </div>
-  
-      <el-switch v-if="type == 4"
-    style="margin-top: 30px;margin-left:30px"
-          v-model="selfServiceBank"
-          active-text
-          inactive-text="是否有在行自助银行"
-          :active-value="1"
-          :inactive-value="0"
-        ></el-switch>
-        <div v-if="type == 4&selfServiceBank>0" style="margin-top: 30px">
+
+    <el-switch
+      v-if="type == 4"
+      style="margin-top: 30px; margin-left: 30px"
+      v-model="selfServiceBank"
+      active-text
+      inactive-text="是否有在行自助银行"
+      :active-value="1"
+      :inactive-value="0"
+    ></el-switch>
+    <div v-if="(type == 4) & (selfServiceBank > 0)" style="margin-top: 30px">
       <h3 class="title">在行自助银行信息</h3>
       <div class="info-box">
-        <el-switch v-if="false"
+        <el-switch
+          v-if="false"
           v-model="selfServiceBank"
           active-text
           inactive-text="是否有在行自助银行"
           :active-value="1"
           :inactive-value="0"
         ></el-switch>
-        <span >在行式大堂设备</span>
+        <span>在行式大堂设备</span>
         <div style="display: inline-block; width: 200px">
           <el-input-number
             style="margin-left: 10px"
@@ -485,10 +518,13 @@
             align="center"
           />
           <el-table-column type="index" label="序号" align="center" prop="id" />
-          <el-table-column label="标准" align="center" prop="standard" >
+          <el-table-column label="标准" align="center" prop="standard">
             <template slot-scope="r"
               >{{
-                getLabel(dict.type.org_extend_self_service_bank_standard, `${r.row.standard}`)
+                getLabel(
+                  dict.type.org_extend_self_service_bank_standard,
+                  `${r.row.standard}`
+                )
               }}
             </template>
           </el-table-column>
@@ -529,7 +565,7 @@
           >
             <template slot-scope="scope">
               <el-button
-              v-if="scope.row.certificate"
+                v-if="scope.row.certificate"
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -609,10 +645,13 @@
             align="center"
           />
           <el-table-column type="index" label="序号" align="center" prop="id" />
-          <el-table-column label="标准" align="center" prop="standard" >
+          <el-table-column label="标准" align="center" prop="standard">
             <template slot-scope="r"
               >{{
-                getLabel(dict.type.org_extend_detached_standard, `${r.row.standard}`)
+                getLabel(
+                  dict.type.org_extend_detached_standard,
+                  `${r.row.standard}`
+                )
               }}
             </template>
           </el-table-column>
@@ -653,7 +692,7 @@
           >
             <template slot-scope="scope">
               <el-button
-              v-if="scope.row.certificate"
+                v-if="scope.row.certificate"
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -708,19 +747,19 @@
         <el-form-item label="标准" prop="standard">
           <!-- <el-input v-model="Businessform.standard" placeholder="请输入标准" /> -->
           <el-select
-              prop="planType"
-              label="标准"
-              v-model="Businessform.standard"
-              placeholder="请选择标准"
-              clearable
-            >
-              <el-option
-                v-for="dict in dict.type.org_extend_business_library_standard"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+            prop="planType"
+            label="标准"
+            v-model="Businessform.standard"
+            placeholder="请选择标准"
+            clearable
+          >
+            <el-option
+              v-for="dict in dict.type.org_extend_business_library_standard"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="达标日期" prop="dateOfCompliance">
           <el-date-picker
@@ -793,19 +832,19 @@
         <el-form-item label="标准" prop="standard">
           <!-- <el-input v-model="Bankform.standard" placeholder="请输入标准" /> -->
           <el-select
-              prop="planType"
-              label="标准"
-              v-model="Bankform.standard"
-              placeholder="请选择标准"
-              clearable
-            >
-              <el-option
-                v-for="dict in dict.type.org_extend_self_service_bank_standard"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+            prop="planType"
+            label="标准"
+            v-model="Bankform.standard"
+            placeholder="请选择标准"
+            clearable
+          >
+            <el-option
+              v-for="dict in dict.type.org_extend_self_service_bank_standard"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="达标日期" prop="dateOfCompliance">
           <el-date-picker
@@ -876,19 +915,19 @@
         <el-form-item label="标准" prop="standard">
           <!-- <el-input v-model="orgform.standard" placeholder="请输入标准" /> -->
           <el-select
-              prop="planType"
-              label="标准"
-              v-model="orgform.standard"
-              placeholder="请选择标准"
-              clearable
-            >
-              <el-option
-                v-for="dict in dict.type.org_extend_standard"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+            prop="planType"
+            label="标准"
+            v-model="orgform.standard"
+            placeholder="请选择标准"
+            clearable
+          >
+            <el-option
+              v-for="dict in dict.type.org_extend_standard"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="达标日期" prop="dateOfCompliance">
           <el-date-picker
@@ -927,7 +966,6 @@
             <image-upload
               :limit="1"
               :fileSize="2"
-              
               @input="uploadorgSuccess"
             ></image-upload>
           </div>
@@ -961,19 +999,19 @@
         <el-form-item label="标准" prop="standard">
           <!-- <el-input v-model="detachedform.standard" placeholder="请输入标准" /> -->
           <el-select
-              prop="planType"
-              label="标准"
-              v-model="detachedform.standard"
-              placeholder="请选择标准"
-              clearable
-            >
-              <el-option
-                v-for="dict in dict.type.org_extend_detached_standard"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+            prop="planType"
+            label="标准"
+            v-model="detachedform.standard"
+            placeholder="请选择标准"
+            clearable
+          >
+            <el-option
+              v-for="dict in dict.type.org_extend_detached_standard"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="达标日期" prop="dateOfCompliance">
           <el-date-picker
@@ -1080,6 +1118,7 @@ export default {
     "org_extend_business_library_standard",
     "org_extend_self_service_bank_standard",
     "org_extend_detached_standard",
+    "org_extend_is",
   ],
   props: [],
   components: {},
@@ -1115,7 +1154,7 @@ export default {
       ownership: null,
       outsideArea: null,
       askari: 1,
-      businessLibrary:1,
+      businessLibrary: 1,
       businessLibraryType: 1,
       dutyMode: 0,
       remoteControl: null,
@@ -1130,7 +1169,7 @@ export default {
       detachedWallPenetratingEquipment: null,
       cashAddingRoomRemoteControl: null,
       source: null,
-      askariCertificate:null,
+      askariCertificate: null,
       //机构建设数据
 
       // 遮罩层
@@ -1223,7 +1262,7 @@ export default {
   },
   mounted() {},
   methods: {
-    getImgUrl(fileList){
+    getImgUrl(fileList) {
       let matchResult = fileList.match(/\/statics(.*)/);
       if (matchResult) {
         let result = matchResult[0];
@@ -1231,7 +1270,7 @@ export default {
       } else {
       }
       // this.askariCertificate=img;
-      console.log(this.askariCertificate,'imgs')
+      console.log(this.askariCertificate, "imgs");
     },
     downBusiness(file) {
       window.open(file);
@@ -1308,10 +1347,10 @@ export default {
           this.askari = data.data.askari;
           this.remoteControl = data.data.remoteControl;
           this.selfServiceBank = data.data.selfServiceBank;
-          this.businessLibrary=data.data.businessLibrary;
+          this.businessLibrary = data.data.businessLibrary;
           this.lobbyEquipment = data.data.lobbyEquipment;
           this.wallPenetratingEquipment = data.data.wallPenetratingEquipment;
-          this.askariCertificate=data.data.askariCertificate;
+          this.askariCertificate = data.data.askariCertificate;
           this.extendId = data.data.id;
           this.constructionTime = data.data.constructionTime;
           this.lastUpdateTime = data.data.lastUpdateTime;
@@ -1752,16 +1791,16 @@ export default {
       let dat = {
         orgType: this.orgType,
         weatherAreaCode: this.weatherAreaCode,
-        askariCertificate:this.askariCertificate,
+        askariCertificate: this.askariCertificate,
         premisesArea: this.premisesArea,
-        ownership: this.ownership ? 1 : 0,
-        outsideArea: this.outsideArea ? 1 : 0,
+        ownership: this.ownership ,
+        outsideArea: this.outsideArea ,
         askari: this.askari ? 1 : 0,
         businessLibraryType: this.businessLibraryType,
         dutyMode: this.dutyMode,
         remoteControl: this.remoteControl ? 1 : 0,
         selfServiceBank: this.selfServiceBank ? 1 : 0,
-        businessLibrary:this.businessLibrary?1:0,
+        businessLibrary: this.businessLibrary ? 1 : 0,
         lobbyEquipment: this.lobbyEquipment,
         wallPenetratingEquipment: this.wallPenetratingEquipment,
         platformBrand: this.platformBrand,

+ 13 - 2
src/views/system/dept/index.vue

@@ -79,6 +79,7 @@
             </el-select>
           </el-form-item>
           <el-form-item>
+            
             <el-button
               type="primary"
               icon="el-icon-search"
@@ -109,7 +110,7 @@
               plain
               icon="el-icon-plus"
               size="mini"
-              @click="handleAdd(row)"
+              @click="handleAdd"
               v-hasPermi="['system:dept:add']"
               >新增</el-button
             >
@@ -557,9 +558,19 @@ export default {
       this.handleQuery();
     },
     /** 新增按钮操作 */
-    handleAdd(row) {
+    handleAdd() {
+      console.log(this.queryParams.parentId,"this.queryParams.parentId")
+      console.log(this.form.parentId,"this.form.parentId")
       this.reset();
       if (this.queryParams.parentId != undefined) {
+        if (this.pId != -1) {
+          deptTreeSelect().then((response) => {
+        this.deptOptions2 = response.data;
+        this.defaultKeys.push(response.data[0].id);
+        // this.queryParams.parentId = response.data[0].id;
+        // this.handleQuery();
+      });
+      }
         this.form.parentId = this.queryParams.parentId;
       }
       this.open = true;