Your Name
2022-08-01 1621b3719092d93e6c29f7a27e401529e0454420
src/views/doublePrevent/riskLevel/riskCheckUnit/index.vue
文件名从 src/views/doublePrevent/riskLevel/check/index.vue 修改
@@ -10,16 +10,7 @@
                </div>
                <div class="basic-line">
                    <span>部门:</span>
                    <el-cascader
                        :options="departmentList"
                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                        placeholder="请选择部门"
                        clearable
                        filterable
                        class="input-box"
                        v-model="checkUnitData.params.depId"
                    >
                    </el-cascader>
                    <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="checkUnitData.params.depId"> </el-cascader>
                </div>
                <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch">
                    <el-icon>
@@ -42,27 +33,16 @@
                <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" width="150">
                <el-table-column label="操作" width="200" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" @click="onDelcheckUnit(scope.row)">删除</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelcheckUnit(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="checkUnitData.params.pageIndex"
                background
                v-model:page-size="checkUnitData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="checkUnitData.total"
                class="page-position"
            >
            </el-pagination>
            <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="checkUnitData.params.pageIndex" background v-model:page-size="checkUnitData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="checkUnitData.total" class="page-position"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -75,6 +55,7 @@
import { ElMessageBox, ElMessage } from 'element-plus';
import checkUnitDialog from './components/checkUnitDialog.vue';
import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit/index.ts';
import { Edit, Delete, View } from '@element-plus/icons-vue';
// 定义接口来定义对象的类型
interface TableData {
@@ -99,8 +80,8 @@
}
export default defineComponent({
    name: 'checkUnit',
    components: { checkUnitDialog },
    name: 'index',
    components: { checkUnitDialog, Edit, Delete, View },
    setup() {
        const checkUnitDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -178,6 +159,9 @@
        });
        return {
            Edit,
            Delete,
            View,
            handleSearch,
            onOpenDialogRef,
            onHandleSizeChange,