From cd92b35c810d6a762e9c30b896c38928e2d2d87a Mon Sep 17 00:00:00 2001 From: zhaojiale <631455805@qq.com> Date: 星期一, 15 八月 2022 14:41:19 +0800 Subject: [PATCH] 事故快报与应急队伍修改 --- src/views/goalManagement/performanceAppraisal/index.vue | 92 ++++++++++++++++++++++++++++++--------------- 1 files changed, 61 insertions(+), 31 deletions(-) diff --git a/src/views/goalManagement/performanceAppraisal/index.vue b/src/views/goalManagement/performanceAppraisal/index.vue index cfe1191..53838f6 100644 --- a/src/views/goalManagement/performanceAppraisal/index.vue +++ b/src/views/goalManagement/performanceAppraisal/index.vue @@ -7,10 +7,7 @@ <el-row> <el-col :span="4"> <el-form-item size="default"> - <el-select v-model="ruleForm.searchParams.examineDepartmentId" style="width: 100%" placeholder="请选择考核部门"> - <el-option label="Zone one" value="shanghai" /> - <el-option label="Zone two" value="beijing" /> - </el-select> + <el-tree-select v-model="ruleForm.searchParams.examineDepartmentId" :data="data" check-strictly="true" class="w100" :props="propse" placeholder="请选择" /> </el-form-item> </el-col> <el-col :span="4"> @@ -24,16 +21,17 @@ <div class="btns"> <div> <el-button size="default" type="primary" :icon="Plus" @click="openD('新建')">新建</el-button> - <el-button size="default" :disabled="warning" type="warning" plain :icon="EditPen">修改</el-button> + <el-button size="default" :disabled="warning" type="warning" plain :icon="EditPen" + @click="openD('修改', deletAll[0])">修改</el-button> <el-button size="default" :disabled="danger" type="danger" plain :icon="Delete" @click="onDeleteAll">删除</el-button> </div> </div> <el-table ref="multipleTableRef" :data="tableData" style="width: 100%" @selection-change="handleSelectionChange"> <el-table-column type="selection" align="center" width="55" /> <el-table-column type="expand"> - <template #default> + <template #default="scope"> <div class="tableC"> - <el-table :data="tableData.currentExamineDtoList" style="width: 100%"> + <el-table :data="scope.row.currentExamineDtoList" style="width: 100%"> <el-table-column align="center" prop="itemDetail" label="考核项目" /> <el-table-column align="center" prop="content" label="考核内容" /> <el-table-column align="center" prop="number" label="考核分数" /> @@ -41,10 +39,10 @@ </div> </template> </el-table-column> - <el-table-column property="examineDate" align="center" label="考核日期" sortable /> - <el-table-column property="beExaminedDepartmentId" align="center" label="考核部门" sortable /> - <el-table-column property="examinePersonId" label="考核人" align="center" sortable show-overflow-tooltip /> - <el-table-column property="beExaminedDepartmentId" label="被考核部门" align="center" sortable show-overflow-tooltip /> + <el-table-column property="examineDate" align="center" :formatter="timeDate" label="考核日期" sortable /> + <el-table-column property="examineDepartmentName" align="center" label="考核部门" sortable /> + <el-table-column property="examinePersonName" label="考核人" align="center" sortable show-overflow-tooltip /> + <el-table-column property="beExaminedDepartmentName" label="被考核部门" align="center" sortable show-overflow-tooltip /> <el-table-column property="examineTotalNumber" label="总分" align="center" sortable show-overflow-tooltip /> <el-table-column property="numberDetailJson.number" label="考核结果" align="center" sortable show-overflow-tooltip /> <el-table-column property="extraFile" label="附件" align="center" sortable show-overflow-tooltip /> @@ -87,16 +85,16 @@ <div class="btns"> <div> <el-button size="default" type="primary" :icon="Plus" @click="openDs('新建')">新建</el-button> - <el-button size="default" :disabled="warnings" type="warning" plain :icon="EditPen">修改</el-button> + <!-- <el-button size="default" :disabled="warnings" type="warning" plain :icon="EditPen">修改</el-button> --> <el-button size="default" :disabled="dangers" type="danger" plain :icon="Delete" @click="onDeleteAlls">删除</el-button> </div> </div> <el-table ref="multipleTableRef" :data="tableDatas" style="width: 100%" @selection-change="handleSelectionChanges"> <el-table-column type="selection" align="center" width="55" /> <el-table-column type="expand"> - <template #default> + <template #default="scope"> <div class="tableC"> - <el-table :data="tableDatas.examineItemList" style="width: 100%"> + <el-table :data="scope.row.examineItemList" style="width: 100%"> <el-table-column align="center" prop="itemType" label="类型" /> <el-table-column align="center" prop="itemDetail" label="考核项目" /> <el-table-column align="center" prop="content" label="考核内容" /> @@ -108,9 +106,9 @@ </el-table-column> <el-table-column label="标准标题" property="title" align="center" sortable /> <el-table-column property="applyRange" align="center" label="适用范围" sortable /> - <el-table-column property="setPersonId" label="设定人" align="center" sortable show-overflow-tooltip /> - <el-table-column property="setPersonDepartmentId" label="设定人部门" align="center" sortable show-overflow-tooltip /> - <el-table-column property="createTime" label="设定日期" align="center" sortable show-overflow-tooltip /> + <el-table-column property="setPersonName" label="设定人" align="center" sortable show-overflow-tooltip /> + <el-table-column property="setPersonDepartmentName" label="设定人部门" align="center" sortable show-overflow-tooltip /> + <el-table-column property="setTimem" label="设定日期" align="center" :formatter="timeDate" sortable show-overflow-tooltip /> <el-table-column property="templateCode" label="模板分类编码" align="center" sortable show-overflow-tooltip /> <el-table-column property="acceptanceNumber" label="合格分数" align="center" sortable show-overflow-tooltip /> <el-table-column label="操作" align="center" width="250px"> @@ -135,23 +133,25 @@ </el-tab-pane> </el-tabs> </div> - <DailogAq ref="ShowAdd" @navAddorUpdata="onAddorUpdata"></DailogAq> - <DailogKh ref="ShowAdds" @navAddorUpdata="onAddorUpdatas"></DailogKh> + <DailogAq ref="openAdd" @navAddorUpdata="onAddorUpdata"></DailogAq> + <DailogKh ref="openAdds" @navAddorUpdata="onAddorUpdatas"></DailogKh> </div> </template> <script lang="ts"> +import {timeDate} from '/@/assets/index.ts' import DailogAq from './component/DailogAq.vue'; import DailogKh from './component/DailogKh.vue'; import { ref, toRefs, reactive, onMounted, defineComponent } from 'vue'; -import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus'; +import { ElMessageBox, ElMessage, ElButton, ElInput, FormInstance } from 'element-plus'; import { Plus, Delete, Upload, Download, Refresh, View, EditPen } from '@element-plus/icons-vue'; +import type { TabsPaneContext } from 'element-plus' import { goalManagementApi } from '/@/api/goalManagement'; export default defineComponent({ components: { ElButton, ElInput, DailogAq, DailogKh }, setup() { // 搜索条件 安全考核管理 const ruleForm = reactive({ - pageSize: 2, + pageSize: 10, pageIndex: 1, searchParams: { examineDepartmentId: '', @@ -160,6 +160,7 @@ // 重置 const resetForm = () => { ruleForm.searchParams.examineDepartmentId = ''; + listApi() }; const listApi = () => { goalManagementApi() @@ -204,6 +205,8 @@ }; // 删除 const onDelete = (id: number) => { + let arr=[] + arr.push(id) ElMessageBox.confirm('确定删除所选项吗?', 'Warning', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -211,7 +214,7 @@ }) .then(() => { goalManagementApi() - .getexamineMngDelete(id) + .getexamineMngDelete(arr) .then((res) => { if (res.data.code == 200) { ElMessage({ @@ -241,7 +244,7 @@ for (let i = 0; i < valId.length; i++) { arr.push(valId[i].id); } - deletAll.value = arr.toString(); + deletAll.value = arr if (val.length == 1) { warning.value = false; danger.value = false; @@ -283,8 +286,9 @@ }; // 切换 const activeName = ref('1'); - const handleClick = (val: any) => { - if (val == '1') { + const handleClick = (val: TabsPaneContext) => { + console.log(val) + if (val.props.name == '1') { listApi(); }else{ listApis(); @@ -300,11 +304,12 @@ }); // 重置 const resetForms = () => { - ruleForm.searchParams.examineDepartmentId = ''; + ruleForms.searchParams.title = ''; + listApis() }; const listApis = () => { goalManagementApi() - .getexamineTemplateList(ruleForm) + .getexamineTemplateList(ruleForms) .then((res) => { if (res.data.code == 200) { tableDatas.value = res.data.data; @@ -318,6 +323,7 @@ }; onMounted(() => { listApis(); + department() }); const onAddorUpdatas = () => { listApis(); @@ -344,6 +350,8 @@ }; // 删除 const onDeletes = (id: number) => { + let arr=[] + arr.push(id) ElMessageBox.confirm('确定删除所选项吗?', 'Warning', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -351,14 +359,14 @@ }) .then(() => { goalManagementApi() - .getexamineTemplateDelete(id) + .getexamineTemplateDelete(arr) .then((res) => { if (res.data.code == 200) { ElMessage({ message: res.data.msg, type: 'success', }); - listApi(); + listApis(); } else { ElMessage.error(res.data.msg); } @@ -381,7 +389,7 @@ for (let i = 0; i < valId.length; i++) { arr.push(valId[i].id); } - deletAlls.value = arr.toString(); + deletAlls.value = arr; if (val.length == 1) { warnings.value = false; dangers.value = false; @@ -408,7 +416,7 @@ message: res.data.msg, type: 'success', }); - listApi(); + listApis(); } else { ElMessage.error(res.data.msg); } @@ -421,7 +429,29 @@ // }); }); }; + //部门树 + const department = () => { + goalManagementApi() + .getTreedepartment() + .then((res) => { + if (res.data.code == 200) { + data.value = res.data.data; + } else { + ElMessage.error(res.data.msg); + } + }); + }; + const propse = { + label: 'depName', + children: 'children', + value: 'depId', + }; + const data = ref(); return { + timeDate, + department, + propse, + data, activeName, ruleForm, resetForm, -- Gitblit v1.9.2