Bladeren bron

隐藏终端删除

yuanmingze 3 dagen geleden
bovenliggende
commit
fc137ba3fc
1 gewijzigde bestanden met toevoegingen van 32 en 32 verwijderingen
  1. 32 32
      src/views/admin/wmdahospital/index.vue

+ 32 - 32
src/views/admin/wmdahospital/index.vue

@@ -36,11 +36,11 @@
           <span class="cityColor" @click="toAddress">{{ city }}</span>
         </el-form-item>
         <el-form-item label="地址:" prop="address">
-          <div class="map" style="overflow: hidden;">
-            <el-input v-model="addressKeyword" placeholder="请输入地址来直接查找相关位置" clearable style="margin-bottom:20px">
+          <div class="map" style="overflow: hidden">
+            <el-input v-model="addressKeyword" placeholder="请输入地址来直接查找相关位置" clearable style="margin-bottom: 20px">
               <el-button slot="append" icon="el-icon-search" @click="getAddressKeyword"></el-button>
             </el-input>
-            <div id="container" style="width:100%; height:300px"></div>
+            <div id="container" style="width: 100%; height: 300px"></div>
           </div>
         </el-form-item>
         <el-row>
@@ -124,20 +124,20 @@
     </el-dialog>
 
     <el-dialog title="上传失败!" width="600px" :close-on-click-modal="false" @close="importErrorDialogClose" :visible.sync="importErrorDialogShow" center>
-      <avue-crud style="width: 100%;" :data="importErrorTableData" :option="option1"> </avue-crud>
+      <avue-crud style="width: 100%" :data="importErrorTableData" :option="option1"> </avue-crud>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import {fetchList, getObj, addObj, putObj, delObj, parseAddress} from '@/api/wmdahospital';
-import {tableOption} from '@/const/crud/wmdahospital';
-import {mapGetters} from 'vuex';
+import { fetchList, getObj, addObj, putObj, delObj, parseAddress } from '@/api/wmdahospital';
+import { tableOption } from '@/const/crud/wmdahospital';
+import { mapGetters } from 'vuex';
 import VDistpicker from 'v-distpicker';
 import maps from 'qqmap';
-import {getDictType} from '@/api/common';
-import {importErrorTableOption} from '@/const/crud/admin/user';
-import {templateDownload} from '@/api/assignPoints/currency/manList';
+import { getDictType } from '@/api/common';
+import { importErrorTableOption } from '@/const/crud/admin/user';
+import { templateDownload } from '@/api/assignPoints/currency/manList';
 import store from '@/store';
 
 export default {
@@ -180,11 +180,11 @@ export default {
       showAddDialog: false,
       dialogType: 'add',
       formRules: {
-        yymc: [{required: true, message: '请输入医院名称', trigger: 'blur'}],
-        latitude: [{required: true, message: '请输入纬度', trigger: 'blur'}],
-        longitude: [{required: true, message: '请输入经度', trigger: 'blur'}],
-        yygm: [{required: true, message: '请选择医院规模', trigger: 'blur'}],
-        yyxz: [{required: true, message: '请选择医院性质', trigger: 'blur'}]
+        yymc: [{ required: true, message: '请输入医院名称', trigger: 'blur' }],
+        latitude: [{ required: true, message: '请输入纬度', trigger: 'blur' }],
+        longitude: [{ required: true, message: '请输入经度', trigger: 'blur' }],
+        yygm: [{ required: true, message: '请选择医院规模', trigger: 'blur' }],
+        yyxz: [{ required: true, message: '请选择医院性质', trigger: 'blur' }]
       },
       yygmOptions: [],
       yyxzOptions: [],
@@ -206,7 +206,7 @@ export default {
     permissionList() {
       return {
         addBtn: this.vaildData(this.permissions.admin_wmdahospital_add, false),
-        delBtn: this.vaildData(this.permissions.admin_wmdahospital_del, false),
+        delBtn: false,
         editBtn: this.vaildData(this.permissions.admin_wmdahospital_edit, false)
       };
     }
@@ -225,13 +225,13 @@ export default {
   },
   methods: {
     getDict() {
-      getDictType({type: 'hospital_level'}).then(res => {
+      getDictType({ type: 'hospital_level' }).then((res) => {
         this.yygmOptions = res.data.data;
       });
-      getDictType({type: 'hospital_xz'}).then(res => {
+      getDictType({ type: 'hospital_xz' }).then((res) => {
         this.yyxzOptions = res.data.data;
       });
-      getDictType({type: 'hospital_cw'}).then(res => {
+      getDictType({ type: 'hospital_cw' }).then((res) => {
         this.ybczsOptions = res.data.data;
       });
     },
@@ -268,7 +268,7 @@ export default {
       }
       if (this.dialogType === 'add') {
         addObj(this.form)
-          .then(res => {
+          .then((res) => {
             this.$message.success('添加成功');
             this.showAddDialog = false;
             this.form = {
@@ -286,7 +286,7 @@ export default {
           .catch(() => {});
       } else {
         putObj(this.form)
-          .then(res => {
+          .then((res) => {
             this.$message.success('修改成功');
             this.showAddDialog = false;
             this.form = {
@@ -369,7 +369,7 @@ export default {
         // 将给定的地址转换为坐标位置
         const cityText = this.city === '请选择区域' ? '' : this.city.replace(/\s*/g, '') || '';
         const address = cityText + this.addressKeyword;
-        this.geocoder.getLocation({address}).then(result => {
+        this.geocoder.getLocation({ address }).then((result) => {
           this.removeMarker();
           this.$nextTick(() => {
             this.markerLayer.updateGeometries([
@@ -393,8 +393,8 @@ export default {
       var lng = parseFloat(this.shopInfo.lng);
       var location = new TMap.LatLng(lat, lng);
       this.geocoder
-        .getAddress({location: location}) // 将给定的坐标位置转换为地址
-        .then(result => {
+        .getAddress({ location: location }) // 将给定的坐标位置转换为地址
+        .then((result) => {
           this.addressKeyword = result.result.address || '';
         });
       this.form.longitude = lng;
@@ -428,7 +428,7 @@ export default {
           this.searchForm
         )
       )
-        .then(response => {
+        .then((response) => {
           this.tableData = response.data.data.records;
           this.page.total = response.data.data.total;
           this.tableLoading = false;
@@ -437,16 +437,16 @@ export default {
           this.tableLoading = false;
         });
     },
-    rowDel: function(row, index) {
+    rowDel: function (row, index) {
       this.$confirm('是否确认删除ID为' + row.id, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       })
-        .then(function() {
+        .then(function () {
           return delObj(row.id);
         })
-        .then(data => {
+        .then((data) => {
           this.$message.success('删除成功');
           this.getList(this.page);
         });
@@ -469,7 +469,7 @@ export default {
     exportTaskInfoAll() {
       this.infoExportAllLoading = true;
       parseAddress()
-        .then(data => {
+        .then((data) => {
           this.$message.success('地址转换成功');
           this.infoExportAllLoading = false;
         })
@@ -506,8 +506,8 @@ export default {
           this.importErrorTableData = [];
           const errorData = res.data.data;
           if (Object.keys(errorData).length > 0) {
-            Object.keys(errorData).forEach(ele => {
-              this.importErrorTableData.push({reason: ele, index: errorData[ele]});
+            Object.keys(errorData).forEach((ele) => {
+              this.importErrorTableData.push({ reason: ele, index: errorData[ele] });
             });
           }
           console.log(this.importErrorTableData);
@@ -531,7 +531,7 @@ export default {
       templateDownload({
         fileName: 'batch_create_hospital_template.xlsx'
       })
-        .then(response => {
+        .then((response) => {
           this.importLoading = false;
           let url = window.URL.createObjectURL(new Blob([response.data]));
           let link = document.createElement('a');