Your Name
2022-08-25 0d661774046de0f6c62f2bab113730d7663bd3d5
解决bug
已修改2个文件
118 ■■■■■ 文件已修改
.env.development 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contingencyManagement/contingency/index.vue 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -27,7 +27,9 @@
#VITE_API_URL_OUT = 'http://192.168.0.52:8011/safeplatform-out'
#本地外包预发接口地址
VITE_API_URL_OUT = 'http://192.168.0.52:7021/safeplatform-out'
#VITE_API_URL_OUT = 'http://192.168.0.52:7021/safeplatform-out'
#VITE_API_URL = 'http://192.168.0.52:7021/safeplatform'
src/views/contingencyManagement/contingency/index.vue
@@ -14,31 +14,21 @@
            </el-select>
          </el-form-item>
          <el-form-item>
             <el-button size="default" type="primary" class="ml10" @click="onSubmit">
               查询
             </el-button>
             <el-button size="default" class="ml10"  @click="submitReset">
               重置
             </el-button>
                        <el-button size="default" type="primary" class="ml10" @click="onSubmit"> 查询 </el-button>
                        <el-button size="default" class="ml10" @click="submitReset"> 重置 </el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="button_Line">
        <div class="button_Left">
          <el-button size="default" type="primary"  @click="onOpenAdd">
            <el-icon>
              <Plus />
            </el-icon>新建
                        <el-icon> <Plus /> </el-icon>新建
          </el-button>
          <el-button size="default" type="warning" plain :disabled="warning" @click="onEdit('修改', deleteAll[0])">
            <el-icon>
              <Edit />
            </el-icon>修改
                        <el-icon> <Edit /> </el-icon>修改
          </el-button>
          <el-button size="default" type="danger" plain :disabled="danger" @click="onDeleteAll">
            <el-icon>
              <Delete />
            </el-icon>删除
                        <el-icon> <Delete /> </el-icon>删除
          </el-button>
        </div>
<!--        <div class="button_Right">-->
@@ -59,16 +49,8 @@
<!--          </el-button>-->
<!--        </div>-->
      </div>
      <el-table
          :data="tableData"
          style="width: 100%"
          ref="multipleTableRef"
          @selection-change="handleSelectionChange"
      >
        <el-table-column
            type="selection"
            width="55"
        />
            <el-table :data="tableData" style="width: 100%" ref="multipleTableRef" @selection-change="handleSelectionChange">
                <el-table-column type="selection" width="55" />
        <el-table-column prop="teamName" label="队伍名称" show-overflow-tooltip sortable></el-table-column>
        <el-table-column prop="teamLevel" label="队伍级别" show-overflow-tooltip sortable>
          <template #default="scope">
@@ -79,44 +61,23 @@
        </el-table-column>
        <el-table-column prop="teamDesc" label="队伍描述" show-overflow-tooltip sortable></el-table-column>
        <el-table-column prop="principalPhone" label="负责人手机" show-overflow-tooltip sortable></el-table-column>
        <el-table-column prop="fileList" label="相关附件" show-overflow-tooltip sortable>
        </el-table-column>
                <el-table-column prop="fileList" label="相关附件" show-overflow-tooltip sortable> </el-table-column>
        <el-table-column label="操作" width="200" align="center" fixed="right">
          <template #default="scope">
            <el-button size="small" text type="primary" @click="onEdit('详情',scope.row.id)">
              <el-icon style="margin-right: 5px;">
                <View />
              </el-icon>查看
                            <el-icon style="margin-right: 5px"> <View /> </el-icon>查看
            </el-button>
            <el-button size="small" text type="primary" @click="onEdit('修改',scope.row.id)">
              <el-icon style="margin-right: 5px;">
                <EditPen />
              </el-icon>修改
                            <el-icon style="margin-right: 5px"> <EditPen /> </el-icon>修改
            </el-button>
            <el-button size="small" text type="primary" @click="onRowDel(scope.row.id)">
              <el-icon>
                <Delete />
              </el-icon>删除
                            <el-icon> <Delete /> </el-icon>删除
            </el-button>
          </template>
        </el-table-column>
      </el-table>
      <div class="pages">
        <el-pagination
            v-if="tableData.length == 0 ? false : true"
            @size-change="onHandleSizeChange"
            @current-change="onHandleCurrentChange"
            class="mt15"
            :pager-count="5"
            :page-sizes="[10, 20, 30]"
            v-model:currentPage="pageIndex"
            background
            v-model:page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="total"
        >
        </el-pagination>
                <el-pagination v-if="tableData.length == 0 ? false : true" @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:currentPage="pageIndex" background v-model:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
      </div>
    </el-card>
    <OpenAdd ref="addRef"  @myAdd="onMyAdd" />
@@ -132,10 +93,7 @@
  ref,
  defineComponent
} from 'vue';
import {
  ElMessageBox,
  ElMessage,
} from 'element-plus';
import { ElMessageBox, ElMessage } from 'element-plus';
import {
  Plus,
  Delete,
@@ -144,12 +102,12 @@
  // Refresh,
  Edit,
  View,
  EditPen,
} from '@element-plus/icons-vue'
    EditPen
} from '@element-plus/icons-vue';
import OpenAdd from '../../contingencyManagement/contingency/component/openAdd.vue'
import OpenAdd from '../../contingencyManagement/contingency/component/openAdd.vue';
import UpData from '../../contingencyManagement/contingency/component/upData.vue';
import {contingencyApi} from "../../../api/contingencyManagement/contingency";
import { contingencyApi } from '../../../api/contingencyManagement/contingency';
export default defineComponent({
  name: 'systemUser',
@@ -172,20 +130,20 @@
      pageIndex: 1,
      pageSize: 10,
      searchParams: {
        teamName: "",
        teamLevel: "",
                teamName: '',
                teamLevel: ''
      }
    })
        });
    // 定义表格数据
    const tableData = ref([]);
    // 列表数据请求
    const onSubmit = async () => {
      let res = await contingencyApi().getTeamManagementList(listQuery)
            let res = await contingencyApi().getTeamManagementList(listQuery);
      if(res.data.code === '200'){
        tableData.value = res.data.data;
                tableData.value = JSON.parse(JSON.stringify(res.data.data));
        for(var a = 0;a<tableData.value.length;a++){
          if(tableData.value[a].fileList!=null&&tableData.value[a].fileList!=''&&tableData.value[a].fileList.length!=0){
            tableData.value[a].fileList = tableData.value[a].fileList[0].fileName
                        tableData.value[a].fileList = tableData.value[a].fileList[0].fileName;
          }
        }
        pageIndex.value = res.data.pageIndex;
@@ -196,9 +154,9 @@
          showClose: true,
          type:'error',
          message:res.data.msg
        })
                });
      }
    }
        };
    // 重置
    const submitReset = () => {
      listQuery.searchParams.teamName = '';
@@ -258,8 +216,9 @@
      ElMessageBox.confirm('确定删除所选项吗?', '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning',
      }).then(() => {
                type: 'warning'
            })
                .then(() => {
        contingencyApi()
          .deleteEmergencyTeam([data])
          .then((res) => {
@@ -267,26 +226,27 @@
              ElMessage({
                showClose: true,
                message: res.data.msg,
                type: 'success',
                                    type: 'success'
              });
              onSubmit();
            } else {
              ElMessage({
                showClose: true,
                message: res.data.msg,
                type: 'error',
                                    type: 'error'
              });
              onSubmit();
            }
          });
      }).catch(() => {});
                })
                .catch(() => {});
    };
    // 多选删除
    const onDeleteAll = () => {
      ElMessageBox.confirm('确定删除所选项吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
                type: 'warning'
      })
          .then(() => {
            contingencyApi()
@@ -296,14 +256,14 @@
                    ElMessage({
                      showClose: true,
                      message: res.data.msg,
                      type: 'success',
                                    type: 'success'
                    });
                    onSubmit();
                  } else {
                    ElMessage({
                      showClose: true,
                      message: res.data.msg,
                      type: 'error',
                                    type: 'error'
                    });
                    onSubmit();
                  }
@@ -349,9 +309,9 @@
      onHandleCurrentChange,
      deleteAll,
      warning,
      danger,
            danger
    };
  },
    }
});
</script>
<style scoped lang="scss">