123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398 |
- <!--
- * @Description:
- * @Date: 2021-05-08 08:41:26
- * @LastEditTime: 2022-09-26 18:22:44
- * @FilePath: \WEB\maintenanceManagement\src\views\performanceManage\performanceEvaluation\performanceEvaluation.vue
- -->
- <template>
- <div style="padding-right: 20px">
- <div class="handle-box">
- <el-input
- class="servertype-serch"
- v-model.trim="mixins_query.userName"
- placeholder="请输入用户名"
- ></el-input>
- <select-tree
- class="new-select-tree"
- selectTreeTitle="所属公司"
- placeholder="请选择所属公司"
- :options="organListCompany"
- :props="defaultProps"
- v-model="mixins_query.companyOrgId"
- @selected="selectedcompanyOrgId"
- >
- </select-tree>
- <select-tree
- class="new-select-tree"
- selectTreeTitle="所属部门"
- placeholder="请选择所属部门"
- :options="organListdepartment"
- :props="defaultProps"
- v-model="mixins_query.deptOrgId"
- >
- </select-tree>
- <el-select
- clearable
- class="servertype-serch"
- v-model="mixins_query.state"
- placeholder="请选择考评状态"
- >
- <el-option
- v-for="(item, index) in allServiceStatu"
- :key="index"
- :label="item.label"
- :value="item.id"
- >{{
- item.label
- }}</el-option>
- </el-select>
- <el-date-picker
- v-show="mixins_query.cycle == 0"
- :clearable="false"
- class="servertype-serch"
- v-model="days"
- type="month"
- placeholder="请选择月"
- format="yyyy年MM月"
- ></el-date-picker>
- <datepicker-quarter
- v-show="mixins_query.cycle == 1"
- :clearable="false"
- class="servertype-serch"
- type="quarter"
- placeholder="请选择季"
- value-format="yyyy年MM季度"
- @change-quarter="changeQuarter"
- ></datepicker-quarter>
- <el-date-picker
- v-show="mixins_query.cycle == 2"
- :clearable="false"
- class="servertype-serch"
- v-model="days"
- type="year"
- placeholder="请选择年"
- format="yyyy年"
- ></el-date-picker>
- <el-radio-group
- v-model="mixins_query.cycle"
- class="mr20 self-el-radio-group-box"
- >
- <el-radio :label="0">月度</el-radio>
- <el-radio :label="1">季度</el-radio>
- <el-radio :label="2">年度</el-radio>
- </el-radio-group>
- <el-button
- type="primary"
- class="search-btn"
- @click="getlistpage"
- icon="el-icon-search"
- >查询 </el-button>
- <!-- <i class="fr fr-fs-fc fr-add iconfont" @click="openEvaluationHandle" v-left-txt-tip data-txt="新增"></i>
- <i class="fr fr-fs-fc fr-del iconfont" @click="delusergroup" v-txt-tip data-txt="删除"></i> -->
- </div>
- <!-- 表格 -->
- <div class="device-manage-table">
- <zz-table
- :cols="cols"
- :settings="{ showCheckbox: false, showIndex: true, stripe: true }"
- :loading="mixins_onQuery"
- :data="mixins_list"
- :pageset="mixins_pageset"
- @page-change="pageChange"
- @selection-change="selectionChange"
- >
- <template
- slot-scope="scope"
- slot="statecolor"
- >
- <span
- v-if="scope.row.state === '未考评'"
- style="color: #fd3a68"
- >{{ scope.row.state }}</span>
- <span
- v-else
- style="color: #21d4dc"
- >{{ scope.row.state }}</span>
- </template>
- <template
- slot-scope="scope"
- slot="opt"
- >
- <div class="opt">
- <el-tooltip
- effect="light"
- placement="bottom"
- content="考评"
- >
- <i
- class="iconfont"
- @click="openEvaluationHandle(scope.row)"
- ></i>
- </el-tooltip>
- <el-tooltip
- effect="light"
- placement="bottom"
- content="详情"
- >
- <i
- class="zoniot_font zoniot-icon-xiangqing"
- @click="openEvaluationDetile(scope.row)"
- ></i>
- </el-tooltip>
- </div>
- </template>
- </zz-table>
- </div>
- </div>
- </template>
- <script>
- import list from '@utils/list.js';
- export default {
- mixins: [list],
- data () {
- return {
- mixins_query: {
- userName: '',
- companyOrgId: '',
- deptOrgId: '',
- state: '',
- cycle: 0,
- year: '',
- month: '',
- sort: 1
- },
- days: new Date(),
- lastQuarter: '',
- scenetypeList: [],
- organListCompany: '',
- organListdepartment: '',
- allServiceStatu: [
- {
- id: 1,
- label: '已考评'
- },
- {
- id: 0,
- label: '未考评'
- }
- ],
- defaultProps: {
- value: 'id', // 唯一标识
- label: 'orgName', // 标签显示
- children: 'orgs' // 子级
- },
- selectRow: '',
- allSelectRow: [],
- cols: [
- {
- label: '用户名',
- prop: 'evaluationBe'
- },
- {
- label: '所属公司',
- prop: 'companyOrgName'
- },
- {
- label: '所属部门',
- prop: 'deptOrgName'
- },
- {
- label: '考评状态',
- prop: 'state',
- slot: 'statecolor'
- },
- {
- label: '考评周期',
- prop: 'cycle'
- },
- {
- label: '操作',
- prop: 'opt',
- slot: 'opt'
- }
- ]
- };
- },
- created () {
- this.getorgTree();
- this.getlistpage();
- },
- methods: {
- getlistpage () {
- switch (this.mixins_query.cycle) {
- case 0:
- this.mixins_query.month = this.days.getMonth() + 1;
- this.mixins_query.year = this.days.getFullYear();
- break;
- case 1:
- this.mixins_query.month = this.lastQuarter.season;
- this.mixins_query.year = this.lastQuarter.year;
- break;
- case 2:
- this.mixins_query.month = '';
- this.mixins_query.year = this.days.getFullYear();
- break;
- default:
- break;
- }
- this.mixins_dataUrl = '/sc-community/evaluation/result/find/page';
- this.mixins_pageset = {
- pageNum: this.mixins_pageset.pageNum,
- pageSize: this.mixins_pageset.pageSize
- };
- this.mixins_post = 'post';
- this.mixins_search();
- },
- changeQuarter (val) {
- this.lastQuarter = val;
- },
- openEvaluationHandle (item) {
- let row = {};
- new Promise((resolve) => {
- this.$http.postForm('/sc-community/evaluation/task/find', { evaluationResultId: item.id }).then(({ status, data, msg }) => {
- if (status === 0) {
- row = data;
- resolve();
- } else {
- this.$message.error(msg);
- }
- });
- }).then(() => {
- new Promise((resolve) => {
- this.$store.dispatch('openModal', {
- url: '/performanceManagement/performanceEvaluation/popups/evaluationEdit.vue',
- width: '1200px',
- height: '510px',
- props: {
- rowInfo: item,
- data: row,
- year: this.mixins_query.year,
- month: this.mixins_query.month,
- callback: resolve
- },
- title: '考评',
- notip: true,
- confirmButtonText: '确定',
- showCancelButton: item.state === '未考评' ? false : true,
- showConfirmButton: item.state === '未考评' ? false : true
- });
- }).then(() => {
- this.mixins_search();
- });
- });
- },
- openEvaluationDetile (item) {
- let row = {};
- new Promise((resolve) => {
- this.$http.postForm('/sc-community/evaluation/task/find', { evaluationResultId: item.id }).then(({ status, data, msg }) => {
- if (status === 0) {
- row = data;
- resolve();
- } else {
- this.$message.error(msg);
- }
- });
- }).then(() => {
- new Promise((resolve) => {
- this.$store.dispatch('openModal', {
- url: '/performanceManagement/performanceEvaluation/popups/evaluationDetail.vue',
- width: '1200px',
- height: '510px',
- props: {
- rowInfo: item,
- data: row,
- cycle: this.mixins_query.cycle,
- year: this.mixins_query.year,
- month: this.mixins_query.month,
- callback: resolve
- },
- title: '考评详情',
- notip: true,
- showCancelButton: true,
- showConfirmButton: true
- });
- }).then(() => {
- // this.mixins_search();
- });
- });
- },
- selectionChange (val) {
- this.selectRow = val;
- },
- getorgTree () {
- // 获取公司树
- this.$http.postForm('/sc-user-center/org/getOrgUserTree', { orgType: 'company', id: '000' }).then(({ status, data, msg }) => {
- if (status === 0 && data) {
- this.organListCompany = data;
- } else {
- this.$message.error(msg);
- }
- });
- },
- selectedcompanyOrgId (e) {
- if (!e) return;
- // 获取 部门树e
- this.$http.postForm('/sc-user-center/org/getOrgUserTree', { orgType: 'department', id: e }).then(({ status, data, msg }) => {
- if (status === 0) {
- this.organListdepartment = data ? data : [];
- } else {
- this.$message.error(msg);
- }
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .handle-box {
- height: 60px;
- background: #ffffff;
- opacity: 1;
- border-radius: 6px;
- box-sizing: border-box;
- padding: 15px 20px;
- margin-bottom: 20px;
- }
- .fr {
- float: right;
- }
- .fr:last-child {
- margin-right: 20px;
- }
- .fr-fs-fc {
- color: #2787f1;
- font-size: 30px;
- }
- .servertype-serch {
- width: 200px;
- height: 30px;
- margin-right: 20px;
- vertical-align: top;
- }
- .new-select-tree {
- vertical-align: top;
- display: inline-block;
- margin-right: 25px;
- width: 200px;
- }
- .servertype-serch-btn {
- width: 60px;
- height: 30px;
- background: #2787f1;
- opacity: 1;
- border-radius: 4px;
- padding: 0;
- }
- .mr20 {
- margin-right: 20px;
- }
- .self-el-radio-group-box {
- vertical-align: sub;
- }
- </style>
|