shj
2022-09-06 c3f6f5906443df62ad462a5d098801afdab91cac
src/views/accidentManagementSystem/accidentCases/index.vue
@@ -37,7 +37,7 @@
            <el-table-column property="value" label="指标值" align="center" sortable show-overflow-tooltip /> -->
            <el-table-column label="操作" align="center" sortable show-overflow-tooltip>
               <template #default="scope">
                  <!-- <el-button link type="primary" size="small" :icon="View" @click="openD('查看', scope.row.id)">查看</el-button> -->
                  <el-button link type="primary" size="small" :icon="View" @click="jump(scope.row.id)">查看</el-button>
                  <el-button link type="primary" size="small" :icon="EditPen" @click="openD('修改', scope.row.id)">编辑</el-button>
                  <el-button link type="primary" size="small" :icon="Delete" @click="onDelete(scope.row.id)">删除</el-button>
               </template>
@@ -64,15 +64,16 @@
import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus';
import { Plus, Delete, Upload, Download, Refresh, View, EditPen } from '@element-plus/icons-vue';
import { accidentManagementSystemApi } from '/@/api/accidentManagementSystem';
import { useRouter } from 'vue-router';
export default defineComponent({
   components: { ElButton, ElInput,DailogCases },
   components: { ElButton, ElInput, DailogCases },
   setup() {
      // 搜索条件
      const ruleForm = reactive({
         pageSize: 10,
         pageIndex: 1,
         searchParams: {
            caseTitle: '',
            caseTitle: '',
         },
      });
      // 下方导航与表格
@@ -116,7 +117,7 @@
      // 打开弹窗
      const Show = ref();
      const openD = (title: String, id: number) => {
         Show.value.openDailog(title,id);
         Show.value.openDailog(title, id);
      };
      // 删除
      const onDelete = (id: number) => {
@@ -128,7 +129,7 @@
            type: 'warning',
         })
            .then(() => {
                    console.log(arr)
               console.log(arr);
               accidentManagementSystemApi()
                  .getaccidentCaseDelete(arr)
                  .then((res) => {
@@ -203,7 +204,19 @@
      const add = () => {
         listApi();
      };
      let router = useRouter();
      let jump = (id:any) => {
         router.push({
            path: '/accidentCasesCop' ,
            query:{
               id:id,
            }
         });
      };
      return {
         jump,
         router,
         listApi,
         add,
         resetForm,