Prechádzať zdrojové kódy

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc_web into V0.0.2

luowei 2 rokov pred
rodič
commit
5113501881

+ 5 - 5
src/views/core/drill/plan/index.vue

@@ -49,7 +49,7 @@
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
             <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-                       v-hasPermi="['core:plan:add']">新增
+                       v-hasPermi="['core:drillPlan:add']">新增
             </el-button>
           </el-col>
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -92,17 +92,17 @@
           </el-table-column>
           <el-table-column label="演练次数" align="center" prop="execTimes"/>
           <el-table-column label="备注" align="center" prop="remark"/>
-          <el-table-column label="修改人" align="center" width="100" prop="updateBy"/>        
+          <el-table-column label="修改人" align="center" width="100" prop="updateBy"/>
           <el-table-column label="操作" align="center" width="180" fixed="right" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button v-if="checkCanPublish(scope.row)" size="mini" type="text" icon="el-icon-edit"
-                         @click="handlePublish(scope.row)" v-hasPermi="['core:plan:publish']">下发
+                         @click="handlePublish(scope.row)" v-hasPermi="['core:drillPlan:publish']">下发
               </el-button>
               <el-button v-if="checkCanEdit(scope.row)" size="mini" type="text" icon="el-icon-edit"
-                         @click="handleUpdate(scope.row)" v-hasPermi="['core:plan:edit']">修改
+                         @click="handleUpdate(scope.row)" v-hasPermi="['core:drillPlan:edit']">修改
               </el-button>
               <el-button v-if="checkCanDel(scope.row)" size="mini" type="text" icon="el-icon-delete"
-                         @click="handleDelete(scope.row)" v-hasPermi="['core:plan:remove']">删除
+                         @click="handleDelete(scope.row)" v-hasPermi="['core:drillPlan:remove']">删除
               </el-button>
             </template>
           </el-table-column>

+ 4 - 4
src/views/core/drill/task/index.vue

@@ -43,7 +43,7 @@
             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
           </el-form-item>
-         
+
         </el-form>
 
 
@@ -92,7 +92,7 @@
                 type="text"
                 icon="el-icon-view"
                 @click="handleDetail(scope.row.id)"
-                v-hasPermi="['system:eduTask:detail']"
+                v-hasPermi="['core:drillTask:query']"
               >详情</el-button>
               <el-button
                 size="mini"
@@ -100,7 +100,7 @@
                 icon="el-icon-document-add"
                 v-if="canPerform(scope.row)"
                 @click="handleRecorded(scope.row.id)"
-                v-hasPermi="['system:eduTask:edit']"
+                v-hasPermi="['core:drillTask:evaluate']"
               >评价</el-button>
               <el-button
                 size="mini"
@@ -108,7 +108,7 @@
                 icon="el-icon-document-add"
                 v-if="canPerform(scope.row)"
                 @click="handleRecorded(scope.row.id)"
-                v-hasPermi="['system:eduTask:remove']"
+                v-hasPermi="['core:drillTask:remove']"
               >演练登记</el-button>
               <el-button type="text" v-if="scope.row.pdfUrl" @click="onDown(scope.row.pdfUrl)"
               >演练登记簿</el-button>

+ 35 - 16
src/views/resumption/plan/index.vue

@@ -259,7 +259,7 @@
           </el-table-column>
 
           <el-table-column
-            prop="modifiedName"
+            prop="updateName"
             label="修改人"
             v-if="columns[6].visible"
           ></el-table-column>
@@ -280,9 +280,10 @@
             </template>
           </el-table-column>
 
-          <el-table-column fixed="right"  width="120" label="操作">
+          <el-table-column fixed="right" width="120" label="操作">
             <template slot-scope="r">
               <el-button
+                v-if="eqOrg(r.row)"
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -291,6 +292,7 @@
                 >编辑</el-button
               >
               <el-button
+                v-if="eqOrg(r.row)"
                 size="mini"
                 type="text"
                 icon="el-icon-delete"
@@ -305,7 +307,8 @@
                 v-if="checkCanPublish(r.row)"
                 @click="showDialogDistribute(r.row)"
                 v-hasPermi="['system:user:remove']"
-                >下发</el-button>
+                >下发</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -332,7 +335,7 @@
 <script>
 import DialogDistribute from "@/views/resumption/plan/distribute.vue";
 import OrgTree from "@/components/orgTree";
-import { mapState, mapMutations } from "vuex";
+import { mapState, mapMutations,mapGetters } from "vuex";
 import DialogEdit from "./dialog.edit";
 import * as api from "@/api/resumption/plan";
 import { statusOptions, getLabel } from "./../../commonOption";
@@ -375,8 +378,8 @@ export default {
         planName: null,
         pageNum: 1,
         pageSize: 10,
-        checkSub:true,
-        roleList:[],
+        checkSub: true,
+        roleList: [],
         ...query,
       },
       pageData: [],
@@ -401,25 +404,38 @@ export default {
   watch: {},
   computed: {
     ...mapState([]),
+    ...mapGetters(["orgId", "orgName"]),
   },
   methods: {
     ...mapMutations([]),
-        //已完成下发的计划不显示下发按钮
+    //判断是否跟当前用户同机构
+    eqOrg(row) {
+      // console.log(row.planCreateOrgId,"row.planCreateOrgId");
+      // console.log(this.orgId,"this.orgId");
+      if (
+        row != null &&
+        row != undefined &&
+        row.planCreateOrgId == this.orgId
+      ) {
+        return true;
+      }
+      return false;
+    },
+    //已完成下发的计划不显示下发按钮
     checkCanPublish(row) {
-      if (row.createOrgType == "1"&&row.children.length==0) {
-        return true
+      if (row.createOrgType == "1" && row.children.length == 0) {
+        return true;
       }
       return false;
     },
-    sel(selectList){
+    sel(selectList) {
       this.loading = true;
       api.distribute(selectList).then((response) => {
         this.getList();
-          this.loading = false;
-        })
+        this.loading = false;
+      });
     },
     async getRolesByOrg() {
-
       await allRole().then((res) => {
         // console.info(res);
         this.resumptionRoles = res.data;
@@ -427,8 +443,11 @@ export default {
     },
     getList() {
       this.loading = true;
-      this.queryParams.roleList=[];
-      if(this.queryParams.resumptionRole!=null&&this.queryParams.resumptionRole!=''){
+      this.queryParams.roleList = [];
+      if (
+        this.queryParams.resumptionRole != null &&
+        this.queryParams.resumptionRole != ""
+      ) {
         this.queryParams.roleList.push(this.queryParams.resumptionRole);
       }
 
@@ -454,7 +473,7 @@ export default {
     onEdit(id, other = {}) {
       this.$refs.editDialog.show(id, other);
     },
-    showDialogDistribute(row){
+    showDialogDistribute(row) {
       this.$refs.dialogDistribute.show(row);
     },
     async onDel(id, name) {

+ 186 - 150
src/views/system/dept/extend.vue

@@ -9,7 +9,7 @@
           :key="v.key"
           >{{ v.value }}</el-descriptions-item
         >
-        <el-descriptions-item label="机构组织类型">{{
+        <el-descriptions-item label="机构组织类型" v-if="false">{{
           getLabel(dict.type.reality_org_type, orgType)
         }}</el-descriptions-item>
         <el-descriptions-item label="是否可用">{{
@@ -32,7 +32,7 @@
         <el-row>
           <el-col :span="8">
             <el-form-item label="机构类型" v-if="false">
-              <el-select v-model="type" placeholder="机构类型">
+              <el-select v-model="type" placeholder="请选择机构类型">
                 <el-option
                   v-for="dict in dict.type.sys_org_type"
                   :key="dict.value"
@@ -44,26 +44,29 @@
           </el-col>
           <el-col :span="8">
             <el-form-item v-if="type == 4" label="城市天气区域">
-<!--              <el-input
+              <!--              <el-input
                 v-model="weatherAreaCode"
                 placeholder="天气区域编码"
                 @input="handleInput2"
               ></el-input>-->
-<!--              <el-select v-model="weatherAreaCode" placeholder="请选择"   clearable>
+              <!--              <el-select v-model="weatherAreaCode" placeholder="请选择"   clearable>
                 <el-option v-for="item in areaList" :key="item.key" :label="item.value" :value="item.key"></el-option>
               </el-select>-->
               <el-cascader
+                clearable
                 v-model="weatherAreaCode"
                 :options="areaList"
                 @change="selectArea"
+                placeholder="请选择城市天气区域"
               ></el-cascader>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item v-if="type == 4" label="营业场所面积">
               <el-input
+                clearable
                 v-model="premisesArea"
-                placeholder="营业场所面积"
+                placeholder="请输入营业场所面积"
                 @input="handleInput"
               ></el-input>
             </el-form-item>
@@ -95,14 +98,18 @@
                 v-model="lastUpdateTime"
                 type="date"
                 value-format="yyyy-MM-dd HH:mm:ss"
-                placeholder="请选择更新日期"
+                placeholder="请选择最近一次更新"
               >
               </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item v-if="type == 10" label="平台品牌">
-              <el-select v-model="platformBrand" placeholder="平台品牌">
+              <el-select
+                clearable
+                v-model="platformBrand"
+                placeholder="请选择平台品牌"
+              >
                 <el-option
                   v-for="dict in dict.type.org_platform_brand"
                   :key="dict.value"
@@ -115,8 +122,9 @@
           <el-col :span="8">
             <el-form-item v-if="type == 10" label="平台供应商品牌">
               <el-select
+                clearable
                 v-model="platformSupplierBrand"
-                placeholder="平台供应商品牌"
+                placeholder="请选择平台供应商品牌"
               >
                 <el-option
                   v-for="dict in dict.type.org_platform_supplier_brand"
@@ -139,38 +147,40 @@
           label-position="left"
           label-width="120px"
         >
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="是否自有产权">
-              <el-select
-                         v-model="ownership"
-                         placeholder="是否自有产权"
-              >
-                <el-option
-                  v-for="dict in dict.type.property_situation"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="是否区域外">
-              <el-select
-                         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>
-            </el-form-item>
-          </el-col>
-        </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="是否自有产权">
+                <el-select
+                  clearable
+                  v-model="ownership"
+                  placeholder="请选择是否自有产权"
+                >
+                  <el-option
+                    v-for="dict in dict.type.property_situation"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="是否区域外">
+                <el-select
+                  clearable
+                  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>
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
       </div>
       <!--  表格   -->
@@ -281,9 +291,9 @@
           <el-col :span="12" :xs="24">
             <p style="font-size: 12px; color: #999">上传保安证</p>
             <image-upload
+              :limit="5"
               :value="askariCertificate"
               :fileSize="2"
-              :type="'alone'"
               @input="getImgUrl"
             ></image-upload>
 
@@ -299,8 +309,7 @@
               <el-image :src="uplp"></el-image>
             </div>
           </el-col> -->
-            <!--            <el-image class="zoom-image border-color-change" :src="uplp" fit="contain"></el-image>-->
-
+          <!--            <el-image class="zoom-image border-color-change" :src="uplp" fit="contain"></el-image>-->
         </el-row>
       </div>
     </div>
@@ -320,7 +329,11 @@
           <el-row>
             <el-col :span="7">
               <el-form-item label="业务库类型">
-                <el-select v-model="businessLibraryType" placeholder="请选择业务库类型">
+                <el-select
+                  clearable
+                  v-model="businessLibraryType"
+                  placeholder="请选择业务库类型"
+                >
                   <el-option
                     v-for="dict in dict.type.business_library_type"
                     :key="dict.value"
@@ -775,24 +788,24 @@
           label="证书"
           prop="certificate"
         >
-          <el-input
+          <!-- <el-input
             v-if="false"
             v-model="Businessform.certificate"
             placeholder="请输入证书"
-          />
+          /> -->
           <div
             class="image-container"
             style="margin-left: 20px"
-            v-if="!Businessform.certificate"
+            v-if="Businessform.certificateEvidence"
           >
             <p style="font-size: 12px; color: #999">上传证书</p>
             <image-upload
-              :limit="1"
+              :limit="5"
               :fileSize="2"
+              :value="Businessform.certificate"
               @input="uploadBusinessSuccess"
             ></image-upload>
           </div>
-          <a :href="Businessform.certificate">点击查看</a>
           <!-- <el-button type="primary" @click="resetimg(Businessform.certificate)">重新上传</el-button> -->
         </el-form-item>
         <el-form-item v-if="false" label="佐证" prop="evidence">
@@ -864,24 +877,24 @@
           label="证书"
           prop="certificate"
         >
-          <el-input
+          <!-- <el-input
             v-if="false"
             v-model="Bankform.certificate"
             placeholder="请输入证书"
-          />
+          /> -->
           <div
             class="image-container"
             style="margin-left: 20px"
-            v-if="!Bankform.certificate"
+            v-if="Bankform.certificateEvidence"
           >
             <p style="font-size: 12px; color: #999">上传证书</p>
             <image-upload
-              :limit="1"
+              :limit="5"
               :fileSize="2"
+              :value="Bankform.certificate"
               @input="uploadBankSuccess"
             ></image-upload>
           </div>
-          <a :href="Bankform.certificate">点击查看</a>
         </el-form-item>
         <el-form-item v-if="false" label="佐证" prop="evidence">
           <el-input v-model="Bankform.evidence" placeholder="请输入佐证" />
@@ -943,24 +956,24 @@
           label="证书"
           prop="certificate"
         >
-          <el-input
+          <!-- <el-input
             v-if="false"
             v-model="orgform.certificate"
             placeholder="请输入证书"
-          />
+          /> -->
           <div
             class="image-container"
             style="margin-left: 20px"
-            v-if="!orgform.certificate"
+            v-if="orgform.certificateEvidence"
           >
             <p style="font-size: 12px; color: #999">上传证书</p>
             <image-upload
-              :limit="1"
+              :limit="5"
               :fileSize="2"
+              :value="orgform.certificate"
               @input="uploadorgSuccess"
             ></image-upload>
           </div>
-          <a :href="orgform.certificate">点击查看</a>
         </el-form-item>
         <el-form-item v-if="false" label="佐证" prop="evidence">
           <el-input v-model="orgform.evidence" placeholder="请输入佐证" />
@@ -1031,24 +1044,24 @@
           label="证书"
           prop="certificate"
         >
-          <el-input
+          <!-- <el-input
             v-if="false"
             v-model="detachedform.certificate"
             placeholder="请输入证书"
-          />
+          /> -->
           <div
             class="image-container"
             style="margin-left: 20px"
-            v-if="!detachedform.certificate"
+            v-if="detachedform.certificateEvidence"
           >
             <p style="font-size: 12px; color: #999">上传证书</p>
             <image-upload
-              :limit="1"
+              :limit="5"
               :fileSize="2"
+              :value="detachedform.certificate"
               @input="uploaddetachedSuccess"
             ></image-upload>
           </div>
-          <a :href="detachedform.certificate">点击查看</a>
         </el-form-item>
         <el-form-item v-if="false" label="佐证" prop="evidence">
           <el-input v-model="detachedform.evidence" placeholder="请输入佐证" />
@@ -1096,8 +1109,8 @@ import {
   updateOrgPhysicalDefenseConstruction,
   delOrgPhysicalDefenseConstruction,
 } from "@/api/system/OrgPhysicalDefenseConstruction";
-import {selectCityInfoVoList} from "@/api/core/weather";
-import TreeNodeDialogVue from '../../tool/build/TreeNodeDialog.vue';
+import { selectCityInfoVoList } from "@/api/core/weather";
+import TreeNodeDialogVue from "../../tool/build/TreeNodeDialog.vue";
 
 export default {
   dicts: [
@@ -1112,22 +1125,26 @@ export default {
     "org_extend_self_service_bank_standard",
     "org_extend_detached_standard",
     "org_extend_is",
-    "property_situation"
+    "property_situation",
   ],
   props: [],
   components: {},
   data() {
     return {
-      reqmsg:false,
+      reqmsg: false,
       //表单验证
       rules: {
         standard: [{ required: true, message: "请输入标准", trigger: "blur" }],
         dateOfCompliance: [
-          { required: TreeNodeDialogVue, message: "请输入达标日期", trigger: "blur" },
-        ],
-        certificate: [
-          { validator: this.isreq, message: "请选择图片", trigger: "blur" },
+          {
+            required: TreeNodeDialogVue,
+            message: "请输入达标日期",
+            trigger: "blur",
+          },
         ],
+        // certificate: [
+        //   { validator: this.isreq, message: "请选择图片", trigger: "blur" },
+        // ],
       },
 
       //基础信息key
@@ -1140,6 +1157,7 @@ export default {
         // { label: "是否可用", key: "isLock" },
         { label: "更新时间", key: "updateTime" },
         { label: "同步时间", key: "createTime" },
+        { label: "机构简称", key: "shortName" },
       ],
 
       type: null,
@@ -1152,8 +1170,8 @@ export default {
       premisesArea: null,
       ownership: null,
       outsideArea: null,
-      askari: 1,
-      businessLibrary: 1,
+      askari: 0,
+      businessLibrary: 0,
       businessLibraryType: null,
       dutyMode: 0,
       remoteControl: null,
@@ -1237,44 +1255,47 @@ export default {
       propItem: "",
 
       row: "",
-      areaList:[],
+      areaList: [],
+      imgs: [],
+      Businessimgs: [],
+      Bankimgs: [],
+      orgimgs: [],
+      detachedimgs: [],
     };
   },
   watch: {
-    'detachedform.certificateEvidence'(newValue) {
+    "detachedform.certificateEvidence"(newValue) {
       if (newValue === 1) {
-        this.reqmsg=true;
+        this.reqmsg = true;
       }
       if (newValue === 0) {
-        this.reqmsg=false;
+        this.reqmsg = false;
       }
     },
-    'Bankform.certificateEvidence'(newValue) {
+    "Bankform.certificateEvidence"(newValue) {
       if (newValue === 1) {
-        this.reqmsg=true;
+        this.reqmsg = true;
       }
       if (newValue === 0) {
-        this.reqmsg=false;
+        this.reqmsg = false;
       }
     },
-    'Businessform.certificateEvidence'(newValue) {
+    "Businessform.certificateEvidence"(newValue) {
       if (newValue === 1) {
-        this.reqmsg=true;
+        this.reqmsg = true;
       }
       if (newValue === 0) {
-        this.reqmsg=false;
+        this.reqmsg = false;
       }
     },
-    'orgform.certificateEvidence'(newValue) {
+    "orgform.certificateEvidence"(newValue) {
       if (newValue === 1) {
-        this.reqmsg=true;
+        this.reqmsg = true;
       }
       if (newValue === 0) {
-        this.reqmsg=false;
+        this.reqmsg = false;
       }
     },
-
-
   },
   computed: {
     switchModel: {
@@ -1297,71 +1318,68 @@ export default {
   },
   mounted() {},
   methods: {
-
     isreq(rule, value, callback) {
-      if(this.reqmsg){
-        callback(new Error('证书为必填项'));
-      }else{
+      if (this.reqmsg) {
+        callback(new Error("证书为必填项"));
+      } else {
         callback();
       }
     },
-    getImgUrl(fileList) {
-      let matchResult = fileList.match(/\/statics(.*)/);
-      if (matchResult) {
-        let result = matchResult[0];
-        this.askariCertificate = result;
-      } else {
-      }
-      // this.askariCertificate=img;
-      console.log(this.askariCertificate, "imgs");
+    // getImgUrl(fileList) {
+    //   let matchResult = fileList.match(/\/statics(.*)/);
+    //   if (matchResult) {
+    //     let result = matchResult[0];
+    //     this.askariCertificate = result;
+    //   } else {
+    //   }
+    //   // this.askariCertificate=img;
+    //   console.log(this.askariCertificate, "imgs");
+    // },
+    getImgUrl(img) {
+      this.imgs.push(img);
+      console.log(this.imgs, "imgs");
     },
     getAreaList() {
-      selectCityInfoVoList({}).then(response => {
+      selectCityInfoVoList({}).then((response) => {
         this.areaList = response.data;
       });
     },
-    selectArea(value){
-      this.weatherAreaCode=value[1];
+    selectArea(value) {
+      this.weatherAreaCode = value[1];
     },
     downBusiness(file) {
-      window.open(file);
+      let array = file.split(',');
+      console.log(array)
+      for (let i = 0; i < array.length; i++) {
+        window.open(array[i]);
+      }
     },
     //证书上传
-    uploadBusinessSuccess(fileList) {
-      let matchResult = fileList.match(/\/statics(.*)/);
-      if (matchResult) {
-        let result = matchResult[0];
-        this.Businessform.certificate = result;
-      } else {
-      }
+    uploadBusinessSuccess(img) {
+      this.Businessimgs.push(img);
     },
-    uploadBankSuccess(fileList) {
-      let matchResult = fileList.match(/\/statics(.*)/);
-      if (matchResult) {
-        let result = matchResult[0];
-        this.Bankform.certificate = result;
-      } else {
-      }
+    uploadBankSuccess(img) {
+      this.Bankimgs.push(img);
     },
-    uploadorgSuccess(fileList) {
-      let matchResult = fileList.match(/\/statics(.*)/);
-      if (matchResult) {
-        let result = matchResult[0];
-        this.orgform.certificate = result;
-      } else {
-      }
+    uploadorgSuccess(img) {
+      this.orgimgs.push(img);
     },
-    uploaddetachedSuccess(fileList) {
-      let matchResult = fileList.match(/\/statics(.*)/);
-      if (matchResult) {
-        let result = matchResult[0];
-        this.detachedform.certificate = result;
-      } else {
-      }
+    uploaddetachedSuccess(img) {
+      this.detachedimgs.push(img);
     },
+
     handleInput() {
       // 使用正则表达式过滤输入,只保留数字和小数点
-      this.premisesArea = this.premisesArea.replace(/[^0-9.]/g, "");
+      // this.premisesArea = this.premisesArea.replace(/[^0-9.]/g, "");
+      // 限制只能输入1到999999之间的数字
+      let value = parseInt(this.premisesArea, 10); // 将输入的值转为整数
+
+      if (isNaN(value) || value < 1 || value > 999999) {
+        // 判断是否在范围内
+        this.premisesArea = ""; // 不在范围内则清空输入的值
+      } else {
+        this.premisesArea = value.toString(); // 在范围内则保留输入的值
+      }
     },
     handleInput2() {
       // 使用正则表达式过滤输入,只保留数字和小数点
@@ -1414,6 +1432,20 @@ export default {
             data.data.detachedWallPenetratingEquipment;
           this.cashAddingRoomRemoteControl =
             data.data.cashAddingRoomRemoteControl;
+          // if (
+          //   this.askariCertificate &&
+          //   this.askariCertificate.trim() &&
+          //   this.askariCertificate.includes(",")
+          // ) {
+          //   this.imgs = this.askariCertificate.split(",");
+          // } else if (
+          //   this.askariCertificate &&
+          //   this.askariCertificate.trim() &&
+          //   this.askariCertificate.includes(".")
+          // ) {
+          //   this.imgs.push(this.askariCertificate);
+          // }
+
           // console.log(this.extendId);
         }
       });
@@ -1477,7 +1509,7 @@ export default {
         updateBy: null,
         orgId: null,
       };
-      this.reqmsg=false;
+      this.reqmsg = false;
       this.resetForm("Businessform");
     },
     // 多选框选中数据
@@ -1504,11 +1536,13 @@ export default {
     },
     /** 提交按钮 */
     submitBusinessForm() {
+      this.Businessform.certificate= this.Businessimgs[this.Businessimgs.length - 1].toString(",");
       this.$refs.Businessform.validate((valid) => {
         if (valid) {
           // 表单验证通过,提交数据或执行其他操作
           this.Businessform.orgId = this.$route.params.id;
           this.Businessform.type = 2;
+
           if (this.Businessform.id != null) {
             // console.log(this.Businessform,"this.Businessform")
             updateOrgPhysicalDefenseConstruction(this.Businessform).then(
@@ -1542,9 +1576,7 @@ export default {
     handleBusinessDelete(row) {
       const Businessids = row.id || this.Businessids;
       this.$modal
-        .confirm(
-          '确认删除?'
-        )
+        .confirm("确认删除?")
         .then(function () {
           return delOrgPhysicalDefenseConstruction(Businessids);
         })
@@ -1577,7 +1609,7 @@ export default {
         updateBy: null,
         orgId: null,
       };
-      this.reqmsg=false;
+      this.reqmsg = false;
       this.resetForm("Bankform");
     },
     // 多选框选中数据
@@ -1604,11 +1636,13 @@ export default {
     },
     /** 提交按钮 */
     submitBankForm() {
+      this.Bankform.certificate= this.Bankimgs[this.Bankimgs.length - 1].toString(",");
       this.$refs.Bankform.validate((valid) => {
         if (valid) {
           // 表单验证通过,提交数据或执行其他操作
           this.Bankform.orgId = this.$route.params.id;
           this.Bankform.type = 3;
+
           if (this.Bankform.id != null) {
             updateOrgPhysicalDefenseConstruction(this.Bankform).then(
               (response) => {
@@ -1641,7 +1675,7 @@ export default {
     handleBankDelete(row) {
       const Bankids = row.id || this.Bankids;
       this.$modal
-        .confirm('确认删除?')
+        .confirm("确认删除?")
         .then(function () {
           return delOrgPhysicalDefenseConstruction(Bankids);
         })
@@ -1672,7 +1706,7 @@ export default {
         updateBy: null,
         orgId: null,
       };
-      this.reqmsg=false;
+      this.reqmsg = false;
       this.resetForm("detachedform");
     },
     // 多选框选中数据
@@ -1699,11 +1733,13 @@ export default {
     },
     /** 提交按钮 */
     submitdetachedForm() {
+      this.detachedform.certificate= this.detachedimgs[this.detachedimgs.length - 1].toString(",");
       this.$refs.detachedform.validate((valid) => {
         if (valid) {
           // 表单验证通过,提交数据或执行其他操作
           this.detachedform.orgId = this.$route.params.id;
           this.detachedform.type = 4;
+ 
           if (this.detachedform.id != null) {
             updateOrgPhysicalDefenseConstruction(this.detachedform).then(
               (response) => {
@@ -1736,9 +1772,7 @@ export default {
     handledetachedDelete(row) {
       const detachedids = row.id || this.detachedids;
       this.$modal
-        .confirm(
-          '确认删除?'
-        )
+        .confirm("确认删除?")
         .then(function () {
           return delOrgPhysicalDefenseConstruction(detachedids);
         })
@@ -1764,7 +1798,7 @@ export default {
         updateBy: null,
         orgId: null,
       };
-      this.reqmsg=false;
+      this.reqmsg = false;
       this.resetForm("orgform");
     },
     // 取消按钮
@@ -1797,11 +1831,13 @@ export default {
     },
     /** 提交按钮 */
     submitOrgForm() {
+      this.orgform.certificate= this.orgimgs[this.orgimgs.length - 1].toString(",");
       this.$refs.orgform.validate((valid) => {
         if (valid) {
           // 表单验证通过,提交数据或执行其他操作
           this.orgform.orgId = this.$route.params.id;
           this.orgform.type = 1;
+  
           if (this.orgform.id != null) {
             updateOrgPhysicalDefenseConstruction(this.orgform).then(
               (response) => {
@@ -1832,7 +1868,7 @@ export default {
     handleOrgDelete(row) {
       const orgids = row.id || this.orgids;
       this.$modal
-        .confirm('确认删除?')
+        .confirm("确认删除?")
         .then(function () {
           return delOrgPhysicalDefenseConstruction(orgids);
         })
@@ -1846,10 +1882,10 @@ export default {
       let dat = {
         orgType: this.orgType,
         weatherAreaCode: this.weatherAreaCode,
-        askariCertificate: this.askariCertificate,
+        askariCertificate: this.imgs[this.imgs.length - 1].toString(","),
         premisesArea: this.premisesArea,
-        ownership: this.ownership ,
-        outsideArea: this.outsideArea ,
+        ownership: this.ownership,
+        outsideArea: this.outsideArea,
         askari: this.askari ? 1 : 0,
         businessLibraryType: this.businessLibraryType,
         dutyMode: this.dutyMode,

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

@@ -59,6 +59,7 @@
                 placeholder="请输入机构名称"
                 clearable
                 @keyup.enter.native="handleQuery"
+                :maxlength="50" @input="inputRestriction"
               />
             </el-form-item>
             <el-form-item label="机构编码" prop="code">
@@ -72,7 +73,7 @@
             <el-form-item label="状态" prop="isLock">
               <el-select
                 v-model="queryParams.isLock"
-                placeholder="机构状态"
+                placeholder="请选择状态"
                 clearable
               >
                 <el-option
@@ -86,7 +87,7 @@
             <el-form-item label="机构类型" prop="type">
               <el-select
                 v-model="queryParams.type"
-                placeholder="机构类型"
+                placeholder="请选择机构类型"
                 clearable
               >
                 <el-option
@@ -288,7 +289,7 @@
                 v-model="form.parentId"
                 :options="deptOptions2"
                 :normalizer="tenantIdnormalizer"
-                placeholder="选择上级机构"
+                placeholder="选择上级机构"
               />
             </el-form-item>
           </el-col>
@@ -297,6 +298,7 @@
           <el-col :span="24">
             <el-form-item label="机构名称" prop="name">
               <el-input
+              :maxlength="50" @input="editRestriction"
                 v-model="form.name"
                 placeholder="请输入机构名称"
                 :disabled="form.source == 1"
@@ -528,6 +530,14 @@ export default {
     this.getAreaList();
   },
   methods: {
+    inputRestriction(){
+      // 限制只允许输入汉字、英文和数字
+      this.queryParams.name = this.queryParams.name.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '');
+    },
+    editRestriction(){
+      // 限制只允许输入汉字、英文和数字
+      this.form.name = this.form.name.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '');
+    },
     getCode(item) {
       if (item != null && item.length > 0) {
         let area = this.areaList.find((v) => v.key === item);

+ 38 - 23
src/views/system/user/index.vue

@@ -22,6 +22,7 @@
           >
             <el-form-item label="用户账号" prop="username">
               <el-input
+              :maxlength="20"
                 v-model="queryParams.username"
                 placeholder="请输入用户账号"
                 clearable
@@ -29,20 +30,23 @@
                 @keyup.enter.native="handleQuery"
               />
             </el-form-item>
-            <el-form-item label="用户角色" prop="roleIds">
-              <!-- <el-input
+            <el-form-item label="手机号码" prop="phone">
+              <el-input
                 v-model="queryParams.phone"
                 placeholder="请输入手机号码"
                 clearable
                 style="width: 200px"
                 @keyup.enter.native="handleQuery"
-              /> -->
+              />
+            </el-form-item>
+            <el-form-item label="用户角色" prop="roleIds">
+             
               <!-- @visible-change="selectAllRoles" -->
               <el-select
                 style="width: 200px"
                 clearable
                 v-model="queryParams.roleId"
-                placeholder="请选择角色"
+                placeholder="请选择用户角色"
               >
                 <el-option
                   v-for="item in role_options"
@@ -55,7 +59,7 @@
             <el-form-item label="状态" prop="isLock">
               <el-select
                 v-model="queryParams.isLock"
-                placeholder="用户状态"
+                placeholder="请选择状态"
                 clearable
                 style="width: 200px"
               >
@@ -317,7 +321,7 @@
               <el-input
                 v-model="form.username"
                 placeholder="请输入用户账号"
-                maxlength="30"
+                :maxlength="20"
                 :readonly="form.source == 1"
               />
             </el-form-item>
@@ -342,7 +346,7 @@
                 :show-count="true"
                 :normalizer="tenantIdnormalizer"
                 :props="{ checkStrictly: true, label: 'name' }"
-                placeholder="请选择属机构"
+                placeholder="请选择属机构"
                 :disabled="form.source == 1"
               />
             </el-form-item>
@@ -352,12 +356,11 @@
           <el-col :span="10">
             <el-form-item label="用户角色" prop="roleIds">
               <el-select
-                ref="mySelect"
                 @visible-change="selectRoles"
                 style="width: 100%"
                 v-model="form.roleIds"
                 multiple
-                placeholder="请选择角色"
+                placeholder="请选择用户角色"
               >
                 <el-option
                   v-for="item in roleOptions"
@@ -370,11 +373,11 @@
             </el-form-item>
           </el-col>
           <el-col :span="10">
-            <el-form-item label="用户性别">
+            <el-form-item label="用户性别" prop="gender">
               <el-select
                 style="width: 100%"
                 v-model="form.gender"
-                placeholder="请选择性别"
+                placeholder="请选择用户性别"
                 :disabled="form.source == 1"
               >
                 <el-option
@@ -527,6 +530,7 @@ export default {
       open: false,
       // 机构名称
       deptName: null,
+      isRoleIdsChanged: true,
       // 默认密码
       initPassword: null,
       // 日期范围
@@ -642,20 +646,31 @@ export default {
     this.getAllRoles();
   },
   watch: {
-    'form.orgId': {
-      handler(newValue, oldValue) {
-        if(oldValue!=undefined){
-        // console.log('myValue changed:', newValue, oldValue)
-        // 在这里可以对值的改变做出响应
-        // this.deptOptions=[];
-        this.form.roleIds=null;
-      //   const dropdown = this.$refs.mySelect.$el.querySelector('.el-select-dropdown');
-      // dropdown.style.display = 'none';
+    'form.orgId'(newValue) {
+      if (this.isRoleIdsChanged) {
+        this.form.roleIds = null;
+      } else {
+        this.isRoleIdsChanged = true;
       }
-      },
-      deep: true
-    }},
+    }
+    // 'form.orgId': {
+    //   handler(newValue, oldValue) {
+    //     if(oldValue!=undefined){
+    //     // console.log('myValue changed:', newValue, oldValue)
+    //     // 在这里可以对值的改变做出响应
+    //     // this.deptOptions=[];
+    //     this.form.roleIds=null;
+    //   //   const dropdown = this.$refs.mySelect.$el.querySelector('.el-select-dropdown');
+    //   // dropdown.style.display = 'none';
+    //   }
+    //   },
+    //   deep: true
+    // }
+  },
   methods: {
+    changeRoleIds(){
+      this.form.roleIds=null;
+    },
     formatter(content){
         if(content){
           const strArr = content.toString().split(',');