| | |
| | | class="input-with-select" |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search"/> |
| | | <el-button :icon="Search" @click="openUser"/> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | ref="multipleTableRef" |
| | | :header-cell-style="{background:'#f6f7fa',color:'#909399'}" |
| | | > |
| | | <el-table-column prop="jobNumber" label="人员工号" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="personnelName" label="人员名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="phone" label="手机号码" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="position" label="职位" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="jobNumber" label="人员工号" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="personnelName" label="人员名称" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="phone" label="手机号码" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="position" label="职位" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" type="primary" text="plain" >查看 |
| | | </el-button> |
| | | <el-button size="small" type="primary" text="plain" @click="onEditEmergencyPersonnel" style="margin-right: 5px;">编辑 |
| | | <el-button size="small" type="primary" text="plain" @click="onEditEmergencyPersonnel(scope.row)" style="margin-right: 5px;">编辑 |
| | | </el-button> |
| | | <el-button size="small" type="primary" text="plain" style="margin-right: 5px;">删除 |
| | | </el-button> |
| | |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <userSelections ref="userRef"/> |
| | | <AddEmergencyPersonnel ref="addRef" /> |
| | | <EditEmergencyPersonnel ref="editRef" /> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | TabsPaneContext, |
| | | FormInstance, |
| | | FormRules, |
| | | ElTable, |
| | | } from 'element-plus' |
| | | import { |
| | | Search |
| | | } from '@element-plus/icons-vue' |
| | | import userSelections from "/@/components/userSelections/index.vue" |
| | | import AddEmergencyPersonnel from "/@/views/contingencyManagement/contingency/component/addEmergencyPersonnel.vue"; |
| | | import EditEmergencyPersonnel from "/@/views/contingencyManagement/contingency/component/editEmergencyPersonnel.vue"; |
| | | // 定义表格数据类型 |
| | |
| | | jobNumber: string |
| | | phone: string; |
| | | position: string; |
| | | } |
| | | // 定义接口来定义对象的类型 |
| | | interface TableDataRow { |
| | | // userName: string; |
| | | // userNickname: string; |
| | | // roleSign: string; |
| | | // department: string[]; |
| | | // phone: string; |
| | | // email: string; |
| | | } |
| | | // 定义接口来定义对象的类型 |
| | | interface DeptData { |
| | |
| | | id: number; |
| | | children?: DeptData[]; |
| | | } |
| | | // 定义接口来定义对象的类型 |
| | | interface RuleFormRow { |
| | | // teamName: string; |
| | | // teamLevel: string; |
| | |
| | | export default defineComponent({ |
| | | name: 'openEdit', |
| | | components: { |
| | | userSelections, |
| | | AddEmergencyPersonnel, |
| | | EditEmergencyPersonnel |
| | | }, |
| | |
| | | }; |
| | | |
| | | //定义表格数据 |
| | | const multipleTableRef = ref<InstanceType<typeof ElTable>>() |
| | | const multipleSelection = ref<User[]>([]) |
| | | const tableData: User[] = [ |
| | | { |
| | |
| | | ], |
| | | }) |
| | | |
| | | // 打开用户选择弹窗 |
| | | const userRef = ref(); |
| | | const openUser = () => { |
| | | userRef.value.openDialog(); |
| | | }; |
| | | |
| | | const ruleFormRef = ref<FormInstance>() |
| | | // 打开弹窗 |
| | | const openDialog = (row: RuleFormRow) => { |
| | |
| | | } |
| | | //表格编辑弹窗 |
| | | const editRef = ref(); |
| | | const onEditEmergencyPersonnel = () => { |
| | | editRef.value.openDialog(); |
| | | const onEditEmergencyPersonnel = (row: TableDataRow) => { |
| | | editRef.value.openDialog(row); |
| | | }; |
| | | return { |
| | | openDialog, |
| | |
| | | rules, |
| | | ruleFormRef, |
| | | tableData, |
| | | multipleTableRef, |
| | | openUser, |
| | | userRef, |
| | | ...toRefs(state), |
| | | }; |
| | | }, |