| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- <template>
- <div>
- <!--选择人员-->
- <el-dialog :close-on-click-modal="false" title="请选择人员" :visible.sync="dialogXzPersVisible" width="60%"
- :modal-append-to-body="true" :append-to-body="true" @close="closeXzRyDialog">
- <el-row>
- <el-col :span="24" style="text-align: right;margin-bottom: 15px;">
- <el-input v-model="name" clearable placeholder="请输入姓名" style="width: 20vw;"></el-input>
- </el-col>
- </el-row>
- <el-table
- v-loading="loading"
- border
- ref="multipleTable"
- :height="tableHeight"
- :data="jichuData"
- tooltip-effect="dark"
- style="width: 100%"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="roleTypeList"
- label="角色"
- show-overflow-tooltip
- >
- <template slot-scope="scope" v-if="scope.row.roleTypeList">
- <span v-for="(item,index) in scope.row.roleTypeList" :key="index">
- {{roleType(item.value) + ' '}}
- </span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="name"
- label="姓名"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="sex"
- label="性别"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- show-overflow-tooltip
- prop="age"
- label="年龄"
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="200"
- label="工作单位"
- show-overflow-tooltip
- prop="workDpNm"
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- label="职务"
- show-overflow-tooltip
- prop="duty"
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="titles"
- label="职称"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <span v-if="scope.row.titles == '1'">正高</span>
- <span v-if="scope.row.titles == '2'">副高</span>
- <span v-if="scope.row.titles == '3'">中级</span>
- <span v-if="scope.row.titles == '4'">初级</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="150"
- prop="telnumb"
- label="电话"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="isOffice"
- label="在职情况"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.isOffice == '1'">是</span>
- <span v-if="scope.row.isOffice == '2'">否</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="education"
- label="学历"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <span v-if="scope.row.education == '1'">专科及以下</span>
- <span v-if="scope.row.education == '2'">本科</span>
- <span v-if="scope.row.education == '3'">研究生</span>
- <span v-if="scope.row.education == '4'">博士</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="workAdNm"
- label="原工作地"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="professional"
- label="从事专业"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="recommendedUnits"
- label="推荐单位"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="unitRanks"
- label="单位职级"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <span v-if="scope.row.unitRanks == '1'">省部级</span>
- <span v-if="scope.row.unitRanks == '2'">地市级</span>
- <span v-if="scope.row.unitRanks == '3'">县市级</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- label="库别"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{groupType(scope.row.groupType)}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="inTm"
- label="入库时间"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="orgNm"
- label="流域机构"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="oe"
- label="体检结果"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="isTraining"
- label="培训情况"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <span v-if="scope.row.isTraining == '1'">是</span>
- <span v-if="scope.row.isTraining == '2'">否</span>
- </template>
- </el-table-column>
- <!--<el-table-column-->
- <!--align="center"-->
- <!--min-width="220"-->
- <!--label="操作"-->
- <!--fixed="right"-->
- <!-->-->
- <!--<template slot-scope="scope">-->
- <!--<span>-->
- <!--<el-button type="primary" size="mini" @click.stop="renYuanModifyThe(scope.row)">编辑</el-button>-->
- <!--<el-button type="danger" size="mini" @click.stop="renYuanDelete(scope.row)">删除</el-button>-->
- <!--</span>-->
- <!--</template>-->
- <!--</el-table-column>-->
- </el-table>
- <!--<el-pagination-->
- <!--style="margin: 10px auto"-->
- <!--background-->
- <!--:pager-count="5"-->
- <!--:current-page="pageNum"-->
- <!--:page-size="pageSize"-->
- <!--:page-sizes="[10, 20, 30, 40, 50, 100]"-->
- <!--layout="sizes, total, prev, pager, next"-->
- <!--:total="total"-->
- <!--@current-change="pageIndexChange"-->
- <!--@size-change="handleSizeChange"-->
- <!--></el-pagination>-->
- <div slot="footer" class="dialog-footer" style="text-align: right;">
- <!--<el-button type="danger" @click="dialogDelPersVisible = false" size="medium">取 消</el-button>-->
- <el-button type="primary" @click="savePersInfo" size="medium">保 存</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import request from '../../utils/gw_ajax_request'
- export default {
- name: "NewPersInfo",
- props: ["roleTypes", "yearBatchId", "editAdd", "rowData", "changeEdit", "changeDataList"],
- data() {
- return {
- loading: false,
- jichuData: [],
- tableHeight: window.innerHeight * .4,
- pageNum: 1,
- pageSize: 20,
- total: 0,
- multipleSelection: [],
- name: "",
- dialogXzPersVisible: true
- }
- },
- computed: {
- userId: function () {
- return localStorage.getItem("userid") ? localStorage.getItem("userid") : '1098101939614724096'
- },
- groupTypeData() {
- return this.$store.state.jcState.groupTypeData;
- },
- roleTypeData() {
- return this.$store.state.jcState.roleTypeData;
- }
- },
- mounted() {
- this.getRyXxData();
- },
- methods: {
- getRyXxData() {
- this.loading = true;
-
- if (this.editAdd) {
- let obj = {
- 'name': this.name,
- 'roleType': this.roleTypes,
- 'yearBatchId': this.yearBatchId,
- 'groupId': this.rowData.id,
- }
- request.post(`/tac/worker/b/getNotDisPersList`, obj).then(res => {
- if (res.success) {
- this.loading = false;
- this.jichuData = res.data;
- } else {
- this.$message.warning(res.message);
- }
- })
- } else {
- let obj = {
- 'name': this.name,
- 'roleType': this.roleTypes,
- 'yearBatchId': this.yearBatchId
- }
- request.post(`/tac/worker/b/getWorkerList`, obj).then(res => {
- if (res.success) {
- this.loading = false;
- this.jichuData = res.data;
- } else {
- this.$message.warning(res.message);
- }
- })
- }
- },
- //角色
- roleType(row) {
- if (row) {
- this.roleTypeData.forEach(ele => {
- if (ele.value == row) {
- row = ele.label;
- }
- });
- return row;
- } else {
- return '';
- }
- },
- //库别
- groupType(row) {
- if (row) {
- this.groupTypeData.forEach(ele => {
- if (ele.value == row) {
- row = ele.label;
- }
- });
- return row;
- } else {
- return '';
- }
- },
- //分页
- // pageIndexChange(val) {
- // this.pageNum = val;
- // this.getRyXxData();
- // },
- // handleSizeChange(val) {
- // this.pageSize = val;
- // this.getRyXxData();
- // },
- handleSelectionChange(val) {
- console.log(val);
- this.multipleSelection = val;
- },
- savePersInfo() {
- if (!this.multipleSelection.length) {
- this.$message.warning("请至少选择一位人员");
- return;
- }
- if (this.editAdd) {
- let obj = {
- "bs": this.multipleSelection,
- "batchId": this.yearBatchId,
- "groupNm": this.rowData.groupNm,
- "groupId": this.rowData.id
- };
- if (this.changeEdit == 'change') {
- obj["updateBs"] = this.changeDataList;
- }
- request.post(`/tac/insp/year/batch/group/pers/updateGroupPers
- `, obj).then(res => {
- if (res.success) {
- this.$message.success("操作成功");
- this.dialogXzPersVisible = false;
- this.$emit("closeXzPers")
- } else {
- this.$message.warning(res.message);
- }
- })
- } else {
- let obj = {
- "persId": this.userId,
- "workerBList": this.multipleSelection,
- "yearBatchId": this.yearBatchId
- }
- request.post(`/tac/worker/b/insertTacWorkerB`, obj).then(res => {
- if (res.success) {
- this.$message.success("操作成功");
- this.dialogXzPersVisible = false;
- this.$emit("closeXzPers")
- } else {
- this.$message.warning(res.message);
- }
- })
- }
- },
- closeXzRyDialog() {
- this.$emit('closeXzPers');
- }
- },
- watch: {
- name() {
- this.getRyXxData();
- }
- }
- }
- </script>
- <style scoped>
- </style>
|