| src/api/cnas/performance/class.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/api/cnas/performance/staffEvaluate.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/CNAS/process/demand/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/performance/class/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/performance/manHour/workTimeConfig.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/performance/staffAttendance/index.vue | 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/performance/staffEvaluate/employee-mutual-evaluation.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/performance/staffEvaluate/evaluation.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/performance/staffEvaluate/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/performance/staffEvaluate/leader-rate.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/performance/staffEvaluate/supervisor-rate.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| vue.config.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/cnas/performance/class.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,83 @@ import resquest from '@/utils/request' export function page(params) { return resquest({ url: '/performanceShift/page', method: 'get', params: params }) } export function pageYear(params) { return resquest({ url: '/performanceShift/pageYear', method: 'get', params: params }) } export function add(data) { return resquest({ url: '/performanceShift/add', method: 'post', data: data }) } export function exportExcel(params) { return resquest({ url: '/performanceShift/export' + params, method: 'get', responseType: 'blob' }) } export function update(data) { return resquest({ url: '/performanceShift/update', method: 'put', data: data }) } export function getUserList() { return resquest({ url: '/performanceShift/getUserList', method: 'get' }) } export function list(params) { return resquest({ url: '/shiftTime/list', method: 'get', params: params }) } export function shiftAdd(data) { return resquest({ url: '/shiftTime/add', method: 'post', data: data }) } export function remove(id) { return resquest({ url: '/shiftTime/remove', method: 'delete', params: id }) } export function obtainItemParameterList(params) { return resquest({ url: '/laboratoryScope/obtainItemParameterList', method: 'get', params: params }) } src/api/cnas/performance/staffEvaluate.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,88 @@ import resquest from '@/utils/request' export function obtainItemParameterList(params) { return resquest({ url: '/laboratoryScope/obtainItemParameterList', method: 'get', params: params }) } export function exportEvaluate(data) { return resquest({ url: '/evaluate/exportEvaluate', method: 'post', data: data, responseType: "blob", }) } export function exportEvaluateLeader(data) { return resquest({ url: '/evaluateLeader/exportEvaluateLeader', method: 'post', data: data, responseType: "blob", }) } export function exportEvaluateCompetent(data) { return resquest({ url: '/evaluateCompetent/exportEvaluateCompetent', method: 'post', data: data, responseType: "blob", }) } export function page(params) { return resquest({ url: '/evaluate/page', method: 'get', params: params, }) } export function getEvaluateGroup(params) { return resquest({ url: '/evaluateGroup/getEvaluateGroup', method: 'get', params: params, }) } export function writeEvaluateLeader(data) { return resquest({ url: '/evaluateLeader/writeEvaluateLeader', method: 'post', data: data, }) } export function getEvaluateLeader(params) { return resquest({ url: '/evaluateLeader/getEvaluateLeader', method: 'get', params: params, }) } export function getEvaluateCompetent(params) { return resquest({ url: '/evaluateCompetent/getEvaluateCompetent', method: 'get', params: params, }) } export function writeEvaluateCompetent(data) { return resquest({ url: '/evaluateCompetent/writeEvaluateCompetent', method: 'post', data: data, }) } src/views/CNAS/process/demand/index.vue
@@ -237,14 +237,14 @@ <p>è¯éªé¡¹ç®</p> <p class="en">Test item</p> </td> <td> <td colspan="2"> <p>æ£éªä¾æ®</p> <p class="en">Test standard</p> </td> <td> <!-- <td> <p>è¯éªè¦æ±</p> <p class="en">Test standard</p> </td> </td> --> <td> <p>夿³¨</p> <p class="en">Note</p> @@ -258,8 +258,8 @@ <p>{{ item.model }}</p> </td> <td>{{ item.product }}</td> <td>{{ item.standardMethodList }}</td> <td>{{ item.groupConcatTell }}</td> <td colspan="2">{{ item.standardMethodList }}</td> <!-- <td>{{ item.groupConcatTell }}</td> --> <td>{{ item.remark }}</td> </tr> <tr> src/views/performance/class/index.vue
@@ -1,9 +1,1322 @@ <template> <div>çæ¬¡</div> <div class="class-page"> <div class="search"> <div class="search_thing"> <div class="search_label">éæ©æ¶é´ï¼</div> <div class="search_input"> <el-date-picker v-model="query.year" :clearable="false" format="yyyy" placeholder="鿩年" size="small" style="width: 140px" type="year" @change="refreshTable()" > </el-date-picker> <el-select v-model="query.month" clearable placeholder="éæ©æ" size="small" style="width: 140px; margin-left: 16px" @change="refreshTable()" > <el-option v-for="item in monthOptions" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> <el-input v-model="query.userName" clearable placeholder="请è¾å ¥äººååç§°" size="small" style="width: 140px; margin: 0 16px" @keyup.enter.native="refreshTable()" ></el-input> <el-select v-model="query.laboratory" clearable placeholder="è¯·éæ©å®éªå®¤" size="small" style="width: 140px" @change="refreshTable()" > <el-option v-for="item in laboratory" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </div> </div> <div class="search_thing" style="padding-left: 30px"> <el-button size="small" @click="refresh()">é ç½®</el-button> <el-button size="small" type="primary" @click="refreshTable()" >æ¥ è¯¢</el-button > </div> <div class="search_thing btns" style="padding-left: 30px"> <el-button v-if="listPower" :loading="downLoading" size="small" type="primary" @click="configTime" >æ¶é´é ç½®</el-button > <el-button v-if="downPower" :loading="downLoading" size="small" type="primary" @click="handleDown" >导 åº</el-button > <el-button v-if="addPower" size="small" type="primary" @click="schedulingVisible = true" >æ ç</el-button > </div> </div> <div v-loading="pageLoading" class="center"> <div v-show="query.month" class="clearfix" style="width: 100%"> <div class="fixed-left"> <div class="content-title" style="padding-left: 16px; box-sizing: border-box" > 人ååç§° </div> <div v-for="(item, index) in list" :key="'e' + index" :class="{ hoverType: currentUserIndex == index }" class="content-user" v-on:mouseenter="onMouseEnter(index)" v-on:mouseleave="currentUserIndex = null" > <div class="user-pic">{{ item.name.charAt(0) }}</div> <div class="user-info"> <p style="font-size: 14px; color: #3a7bfa; line-height: 24px"> <span>{{ item.name }}</span> <span> <span style=" color: #999999; font-size: 12px; display: inline-block; transform: scale(0.9) translateX(5px); " >åºå¤: </span> <span style="font-size: 16px; color: #ff4902"> {{ query.month ? item.monthlyAttendance.totalAttendance : item.sidebarAnnualAttendance.totalAttendance }}天 </span> </span> </p> <p style=" color: #999999; font-size: 12px; transform: scale(0.8) translateX(-20px); white-space: nowrap; width: 150px; overflow-x: show; " > æ©:{{ item.day0 }},ä¸:{{ item.day1 }},å¤:{{ item.day2 }},ä¼:{{ item.day3 }},å:{{ item.day4 }},å·®:{{ item.day6 }} </p> </div> </div> </div> <!-- --> <div class="scroll-right"> <div class="content"> <div class="content-title content-title-right" style="border-bottom: 0" > <div v-for="(item, index) in weeks" :key="'b' + index" class="content-title-item" > <span v-if="item.week == '卿¥'" class="month" style="position: absolute; top: 1px" >{{ item.weekNum }}å¨</span > <p style="height: 26px; position: absolute; bottom: 1px"> <span class="day">{{ item.day }}</span> <span class="week">{{ item.week.charAt(1) }}</span> </p> </div> </div> <div v-for="(item, index) in list" :key="'c' + index" class="content-body" v-on:mouseenter="onMouseEnter(index)" v-on:mouseleave="currentUserIndex = null" > <div v-for="(m, i) in item.list" :key="'d' + i" :class="{ hoverType: currentUserIndex == index }" class="content-body-item" > <el-dropdown :disabled="!upPower" placement="bottom" style="width: 100%; height: 100%; cursor: pointer" trigger="click" @command="(e) => handleCommand(e, m)" > <div :class="{ type0: m.shift === '0', type1: m.shift === '1', type2: m.shift === '2', type3: m.shift === '3', type4: m.shift === '4', type5: m.shift === '5', type6: m.shift === '6', }" class="work-box" > <span :style="`opacity: ${ getShiftByDic(m.shift) == 'æ ' ? 0 : 1 };`" style="cursor: pointer" >{{ getShiftByDic(m.shift) }}</span > </div> <el-dropdown-menu slot="dropdown"> <el-dropdown-item v-for="(n, j) in classType" :key="'h' + j" :command="n.value" >{{ n.label }}</el-dropdown-item > </el-dropdown-menu> </el-dropdown> </div> </div> </div> </div> </div> <div v-show="!query.month" class="clearfix year-table" style="width: 100%" > <div class="fixed-left"> <div class="content-title" style="padding-left: 16px; box-sizing: border-box" > 人ååç§° </div> <div v-for="(item, index) in yearList" :key="'e' + index" :class="{ hoverType: currentUserIndex == index }" class="content-user" v-on:mouseenter="onMouseEnter(index)" v-on:mouseleave="currentUserIndex = null" > <div class="user-pic">{{ item.name.charAt(0) }}</div> <div class="user-info"> <p style="font-size: 14px; color: #3a7bfa; line-height: 24px"> {{ item.name }} </p> <p style=" color: #999999; font-size: 12px; transform: scale(0.8) translateX(-20px); white-space: nowrap; width: 150px; overflow-x: show; " > æ©:{{ item.day0 }},ä¸:{{ item.day1 }},å¤:{{ item.day2 }},ä¼:{{ item.day3 }},å:{{ item.day4 }},å·®:{{ item.day6 }} </p> <p style="margin-top: 4px"> <span style=" color: #999999; font-size: 12px; display: inline-block; transform: scale(0.8) translateX(-10px); " >å计åºå¤: </span ><span style="font-size: 16px; color: #ff4902" >{{ item.year.totalYearAttendance }}天</span > </p> </div> </div> </div> <div class="scroll-right"> <div class="content"> <div> <div :style="`display: grid; grid-template-columns: repeat(${monthList.length}, 1fr);`" class="content-title content-title-right" style="border-bottom: 0; height: 52px" > <div v-for="(item, index) in monthList" :key="'b' + index" class="content-title-item" style="height: 52px" > <span class="month">{{ item }}æ</span> </div> </div> <div v-for="(item, index) in yearList" :key="'c' + index" :style="`display: grid; grid-template-columns: repeat(${monthList.length}, 1fr);`" class="content-body" v-on:mouseenter="onMouseEnter(index)" v-on:mouseleave="currentUserIndex = null" > <div v-for="(m, i) in item.monthList" :key="'d' + i" :class="{ hoverType: currentUserIndex == index }" class="content-body-item" > <p style="color: rgb(153, 153, 153); font-size: 12px"> å计åºå¤ï¼<span style="font-size: 14px; color: #000">{{ m.totalMonthAttendance }}</span> </p> <p style="color: rgb(153, 153, 153); font-size: 12px"> æ©:{{ m.day0 }},ä¸:{{ m.day1 }},å¤:{{ m.day2 }},ä¼:{{ m.day3 }},å:{{ m.day4 }},å·®:{{ m.day6 }} </p> </div> </div> </div> </div> </div> </div> </div> <el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="[10, 20, 50, 100]" :total="total" background layout="sizes,total, prev, pager, next, jumper" style="margin-top: 10px; text-align: right; margin-right: 30px" @size-change="handleSizeChange" @current-change="currentChange" > </el-pagination> <el-dialog :visible.sync="configTimeVisible" title="æ¶é´é ç½®" width="620px"> <div v-loading="configTimeVisibleLoading" style="min-height: 200px"> <div v-for="(item, index) in timeQuery" :key="index"> <div class="form" style="display: flex; justify-content: space-between" > <div style="margin-bottom: 12px; width: 200px"> <span class="form_label">çæ¬¡ï¼</span> <span v-if="!item.isEdit"> {{ item.type }} </span> <span v-if="item.isEdit" class="form_input"> <el-select v-model="item.shift" clearable placeholder="è¯·éæ©" size="small" style="width: 70%; margin-right: 8px" > <el-option v-for="obj in timeTypeList" :key="obj.value" :label="obj.label" :value="obj.value" > </el-option> </el-select> </span> </div> <div style="width: calc(100% - 260px)"> <span class="form_label">æ¶é´ï¼</span> <span v-if="!item.isEdit"> {{ item.startTime && item.endTime ? item.startTime + "~" + item.endTime : "" }} </span> <span v-if="item.isEdit" class="form_input"> <el-time-select v-model="item.startTime" :picker-options="{ start: '00:00', step: '00:15', end: '24:00', }" placeholder="èµ·å§æ¶é´" size="small" style="width: 120px" > </el-time-select> <el-time-select v-model="item.endTime" :picker-options="{ start: '00:00', step: '00:15', end: '24:00', }" placeholder="ç»ææ¶é´" size="small" style="width: 120px" > </el-time-select> </span> </div> <span> <i v-if="item.isEdit" class="el-icon-circle-check" style="margin-left: 10px; color: #4b79f2; cursor: pointer" @click="saveEdit(item, index)" ></i> <i v-if="!item.isEdit" class="el-icon-edit" style="margin-left: 10px; color: #4b79f2; cursor: pointer" @click="item.isEdit = true" ></i> <i v-if="timeQuery.length > 1" class="el-icon-delete" style="margin-left: 10px; color: #ff4902; cursor: pointer" @click="deleteTime(item, index)" ></i> </span> </div> <el-divider></el-divider> <div v-if="index === timeQuery.length - 1" style="color: #4b79f2; cursor: pointer" @click="addTimeForm" > æ·»å æ¶é´é ç½® </div> </div> <div v-if="timeQuery.length === 0" style="color: #4b79f2" @click="addTimeForm" > æ·»å æ¶é´é ç½® </div> </div> </el-dialog> <el-dialog :visible.sync="schedulingVisible" title="æç" width="400px"> <div class="search_thing"> <div class="search_label" style="width: 90px"> <span style="color: red; margin-right: 4px">*</span>卿¬¡ï¼ </div> <div class="search_input" style="width: calc(100% - 90px)"> <el-date-picker v-model="schedulingQuery.week" format="yyyy 第 WW å¨" placeholder="鿩卿¬¡" style="width: 100%" type="week" > </el-date-picker> </div> </div> <div class="search_thing"> <div class="search_label" style="width: 90px"> <span style="color: red; margin-right: 4px">*</span>人ååç§°ï¼ </div> <div class="search_input" style="width: calc(100% - 90px)"> <el-select v-model="schedulingQuery.userId" clearable collapse-tags multiple placeholder="è¯·éæ©" style="width: 100%" > <el-option-group v-for="(item, index) in Object.keys(personList)" :key="index" :label="item" > <el-option v-for="op in personList[item]" :key="op.id" :label="op.name" :value="op.id" > </el-option> </el-option-group> </el-select> </div> </div> <div class="search_thing"> <div class="search_label" style="width: 90px"> <span style="color: red; margin-right: 4px">*</span>çæ¬¡ï¼ </div> <div class="search_input" style="width: calc(100% - 90px)"> <el-select v-model="schedulingQuery.shift" placeholder="è¯·éæ©" style="width: 100%" > <el-option v-for="item in classType" :key="item.value" :label="item.dictLabel" :value="item.dictValue" > </el-option> </el-select> </div> </div> <span slot="footer" class="dialog-footer"> <el-button @click="schedulingVisible = false">å æ¶</el-button> <el-button :loading="loading" type="primary" @click="confirmScheduling" >ç¡® å®</el-button > </span> </el-dialog> </div> </template> <script> export default {}; import { getYearAndMonthAndDays } from "../../../utils/date"; import { page, pageYear, add, list, shiftAdd, remove, exportExcel, getUserList, obtainItemParameterList, update, } from "../../../api/cnas/performance/class"; import { getDicts } from "../../../api/system/dict/data"; export default { components: {}, data() { return { addPower: true, upPower: true, downPower: true, query: { userName: "", laboratory: "", year: new Date(), month: new Date().getMonth() + 1, // month:'' }, monthOptions: [ { value: 1, label: "1æ", }, { value: 2, label: "2æ", }, { value: 3, label: "3æ", }, { value: 4, label: "4æ", }, { value: 5, label: "5æ", }, { value: 6, label: "6æ", }, { value: 7, label: "7æ", }, { value: 8, label: "8æ", }, { value: 9, label: "9æ", }, { value: 10, label: "10æ", }, { value: 11, label: "11æ", }, { value: 12, label: "12æ", }, ], laboratory: [], weeks: [], classType: [], currentUserIndex: null, schedulingVisible: false, personList: [], loading: false, schedulingQuery: { week: "", userId: null, shift: "", }, list: [], currentPage: 1, // å½å页 pageSize: 10, // ä¸é¡µ10æ¡ total: 0, pageLoading: false, // ç»ä»¶loadingçå±ç¤º,é»è®¤ä¸ºtrue finishLoding: false, // å è½½å®æï¼æ¾ç¤ºå·²ç»æ²¡ææ´å¤äº monthList: [], yearList: [], downLoading: false, configTimeVisible: false, // æ¶é´é ç½®å¼¹æ¡ configTimeVisibleLoading: false, // æ¶é´é 置弹æ¡loading timeTypeList: [], timeQuery: [], listPower: false, }; }, watch: {}, mounted() { this.selectEnumByCategory(); this.obtainItemParameterList(); this.getUsers(); if (this.query.month) { this.init(); } else { this.initYear(); } this.monthList = []; for (let i = 12; i > 0; i--) { this.monthList.push(i); } this.monthList.reverse(); }, methods: { refresh() { this.list = []; this.yearList = []; this.currentPage = 1; this.query = { userName: "", laboratory: "", year: new Date(), month: new Date().getMonth() + 1, }; if (this.query.month) { this.init(); } else { this.initYear(); } }, refreshTable() { this.currentPage = 1; if (this.query.month) { this.list = []; this.init(); } else { this.yearList = []; this.initYear(); } }, currentChange(num) { this.currentPage = num; if (this.query.month) { this.init(); } else { this.initYear(); } }, handleSizeChange(val) { this.pageSize = val; if (this.query.month) { this.init(); } else { this.initYear(); } }, transFromNumber(num) { let changeNum = [ "é¶", "ä¸", "äº", "ä¸", "å", "äº", "å ", "ä¸", "å «", "ä¹", ]; //changeNum[0] = "é¶" let unit = ["", "å", "ç¾", "å", "ä¸"]; num = parseInt(num); let getWan = (temp) => { let strArr = temp.toString().split("").reverse(); let newNum = ""; for (var i = 0; i < strArr.length; i++) { newNum = (i == 0 && strArr[i] == 0 ? "" : i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i])) + newNum; } return newNum; }; let overWan = Math.floor(num / 10000); let noWan = num % 10000; if (noWan.toString().length < 4) noWan = "0" + noWan; return overWan ? getWan(overWan) + "ä¸" + getWan(noWan) : getWan(num); }, init() { this.pageLoading = true; let year = this.query.year.getFullYear(); let month0 = this.query.month ? this.query.month : new Date().getMonth() + 1; let month = month0 > 9 ? month0 : "0" + month0; let params = { size: this.pageSize, current: this.currentPage, time: year + "-" + month + "-01 00:00:00", userName: this.query.userName, laboratory: this.query.laboratory, }; page(params).then((res) => { this.pageLoading = false; if (res.code == 201) return; this.total = res.data.page.total; this.list = res.data.page.records.map((item) => { for (let key in item.monthlyAttendance) { let type = this.getDayByDic(key); if (type != undefined || type != null) { item[`day${type}`] = item.monthlyAttendance[key]; } } return item; }); let headerList = res.data.headerList; this.weeks = []; headerList.forEach((item) => { let obj = { weekNum: item.weekly, week: item.headerTime.split(" ")[1], day: item.headerTime.split(" ")[0], }; this.weeks.push(obj); }); }); }, initYear() { this.pageLoading = true; let year = this.query.year.getFullYear(); let params = { size: this.pageSize, current: this.currentPage, time: year + "-01-01 00:00:00", userName: this.query.userName, laboratory: this.query.laboratory, }; pageYear(params).then((res) => { this.pageLoading = false; if (res.code == 201) return; this.total = res.data.total; this.yearList = res.data.records.map((item) => { for (let key in item.year) { let type = this.getDayByDic(key); if (type != undefined || type != null) { item[`day${type}`] = item.year[key]; } } item.monthList = []; for (let m in item.month) { let obj = {}; for (let key in item.month[m]) { let type = this.getDayByDic(key); if (type != undefined || type != null) { obj[`day${type}`] = item.month[m][key]; } } obj.totalMonthAttendance = item.month[m].totalMonthAttendance; item.monthList.push(obj); } return item; }); }); }, onMouseEnter(index) { this.currentUserIndex = index; }, confirmScheduling() { if (!this.schedulingQuery.week) { this.$message.error("è¯·éæ©å¨æ¬¡"); return; } let time = this.schedulingQuery.week.getTime(); let startWeek = getYearAndMonthAndDays(new Date(time - 24 * 60 * 60 * 1000)) + " 00:00:00"; let endWeek = getYearAndMonthAndDays(new Date(time + 24 * 60 * 60 * 1000 * 5)) + " 00:00:00"; if ( !this.schedulingQuery.userId || this.schedulingQuery.userId.length == 0 ) { this.$message.error("è¯·éæ©äººå"); return; } if (!this.schedulingQuery.shift) { this.$message.error("è¯·éæ©çæ¬¡"); return; } this.loading = true; let data = { startWeek, endWeek, userId: this.schedulingQuery.userId.join(","), shift: this.schedulingQuery.shift, }; add(data).then((res) => { this.loading = false; if (res.code == 201) return; this.$message.success("æä½æå"); this.schedulingVisible = false; this.schedulingQuery = { week: "", userId: null, shift: "", }; this.refresh(); }); }, configTime() { getDicts('sys_class_type').then((res) => { console.log("res---", res); this.timeTypeList = res.data; }); this.getTimeList(); this.configTimeVisible = true; }, getTimeList() { this.configTimeVisibleLoading = true; list() .then((res) => { if (res.code == 201) return; if (res.data.length > 0) { res.data.forEach((item) => { item.isEdit = false; const index = this.timeTypeList.findIndex( (val) => val.value === item.shift ); if (index > -1) { item.type = this.timeTypeList[index].label; } }); this.timeQuery = res.data; } this.configTimeVisibleLoading = false; }) .catch((e) => { this.configTimeVisibleLoading = false; console.log("e--", e); }); }, addTimeForm() { this.timeQuery.push({ type: "", shift: "", time: null, isEdit: true, }); }, saveEdit(item, index) { if (item.shift) { const index = this.timeTypeList.findIndex( (val) => val.value === item.shift ); if (index > -1) { item.type = this.timeTypeList[index].label; } } delete item.orderBy; delete item.time; const isEmpty = this.isObjectEmpty(item); if (isEmpty) { this.$message.error("请填å宿´"); return; } let newObj = {}; newObj.shift = item.shift; newObj.startTime = item.startTime; newObj.endTime = item.endTime; if (item.id) { // æidä¸ºä¿®æ¹ newObj.id = item.id; url = this.$api.performanceShift.shiftUpdate; } shiftAdd(newObj).then((res) => { if (res.code == 201) return; this.$message.success("æä½æå"); this.getTimeList(); }); }, deleteTime(item, index) { if (item.id) { remove(item.id).then((res) => { if (res.code == 201) return; this.$message.success("æä½æå"); this.getTimeList(); }); } else { this.timeQuery.splice(index, 1); } }, isObjectEmpty(obj) { return Object.keys(obj).some((key) => !obj[key]); }, handleDown() { let year = this.query.year.getFullYear(); let time = ""; if (this.query.month) { let month = this.query.month > 9 ? this.query.month : "0" + this.query.month; time = year + "-" + month + "-01 00:00:00"; } else { time = year + "-01-01 00:00:00"; } this.downLoading = true; exportExcel( `?time=${time}&userName=${this.query.userName}&laboratory=${ this.query.laboratory }&isMonth=${this.query.month ? true : false}` ).then((res) => { this.$message.success("ä¸è½½æå"); this.downLoading = false; const blob = new Blob([res], { type: "application/force-download", }); let fileName = ""; if (this.query.month) { fileName = year + "-" + this.query.month + " çæ¬¡ä¿¡æ¯"; } else { fileName = year + " çæ¬¡æ±æ»"; } const filename = decodeURI(fileName + ".xlsx"); // å建ä¸ä¸ªè¶ 龿¥ï¼å°æä»¶æµèµè¿å»ï¼ç¶åå®ç°è¿ä¸ªè¶ 龿¥çåå»äºä»¶ const elink = document.createElement("a"); elink.download = filename; elink.style.display = "none"; elink.href = URL.createObjectURL(blob); document.body.appendChild(elink); elink.click(); URL.revokeObjectURL(elink.href); // éæ¾URL 对象 document.body.removeChild(elink); }); }, selectEnumByCategory() { getDicts("sys_class_type").then((res) => { this.classType = res.data; console.log('çæ¬¡ç±»å', this.classType); }); }, obtainItemParameterList() { if (this.PROJECT == "æ£æµä¸å¿") { this.laboratory = [ { label: "é信产åå®éªå®¤", value: "é信产åå®éªå®¤", }, { label: "çµå产åå®éªå®¤", value: "çµå产åå®éªå®¤", }, ]; } else { obtainItemParameterList().then((res) => { let data = []; res.data.forEach((a) => { data.push({ label: a.laboratoryName, value: a.id, }); }); this.laboratory = data; console.log('laboratory', this.laboratory); }); } }, handleCommand(e, m) { if (e != m.shift) { update({ id: m.id, shift: e }).then((res) => { if (res.code == 201) return; this.$message.success("æä½æå"); m.shift = e; }); } }, getUsers() { getUserList().then((res) => { if (res.code === 201) { return; } this.personList = res.data; }); }, getDayByDic(e) { let obj = this.classType.find((m) => m.dictLabel == e); if (obj) { return obj.dictValue; } }, getShiftByDic(e) { let obj = this.classType.find((m) => m.dictValue == e.toString()); if (obj) { return obj.dictLabel; } return "æ "; }, scrollInit() { // è·åè¦ç»å®äºä»¶çå ç´ const nav = document.getElementById("nav"); var flag; // é¼ æ æä¸ var downX; // é¼ æ ç¹å»çx䏿 var scrollLeft; // å½åå ç´ æ»å¨æ¡çåç§»é nav.addEventListener("mousedown", function (event) { flag = true; downX = event.clientX; // è·åå°ç¹å»çx䏿 scrollLeft = this.scrollLeft; // è·åå½åå ç´ æ»å¨æ¡çåç§»é }); nav.addEventListener("mousemove", function (event) { if (flag) { // 夿æ¯å¦æ¯é¼ æ æä¸æ»å¨å ç´ åºå var moveX = event.clientX; // è·åç§»å¨çxè½´ var scrollX = moveX - downX; // å½åç§»å¨çxè½´ä¸æ åå»åç¹å»ä¸å»çxè½´ä¸æ å¾å°é¼ æ æ»å¨è·ç¦» this.scrollLeft = scrollLeft - scrollX; // é¼ æ æä¸çæ»å¨æ¡åç§»éåå»å½åé¼ æ çæ»å¨è·ç¦» } }); // é¼ æ æ¬èµ·åæ¢æå¨ nav.addEventListener("mouseup", function () { flag = false; }); // é¼ æ 离å¼å ç´ åæ¢æå¨ nav.addEventListener("mouseleave", function (event) { flag = false; }); }, }, }; </script> <style></style> <style scoped> .form_title { height: 36px; display: flex; flex-direction: row; justify-content: space-between; font-weight: 800; } .search { height: 50px; display: flex; align-items: center; position: relative; } .search_thing { display: flex; align-items: center; height: 50px; } .search_label { width: 70px; font-size: 14px; text-align: right; } .search_input { display: flex; align-items: center; } .btns { position: absolute; right: 16px; top: 50%; transform: translate(0, -50%); } .center { width: 100%; height: 500px; background-color: #fff; overflow-y: auto; display: flex; } >>> .scroll-pagination { overflow-y: scroll; scrollbar-width: none; } >>> .scroll-pagination::-webkit-scrollbar { display: none; } .fixed-left { float: left; width: 220px; /* 左边åºå宽度 */ background-color: #fff; box-shadow: 2px -2px 5px rgba(51, 51, 51, 0.12); /* 左边é´å½± */ } .clearfix::after { content: ""; display: table; clear: both; } .scroll-right { width: calc(100% - 220px); /* åå»å·¦è¾¹åºå宽度 */ min-height: calc(100% - 10px); /* è§å£é«åº¦ */ margin-left: 220px; overflow-x: scroll; /* overflow-x: hidden; */ } .content { min-height: calc(100% - 10px); /* è§å£é«åº¦ */ } .content-title { height: 52px; line-height: 52px; border-bottom: 1px solid #eeeeee; } .content-title-right { display: flex; align-items: center; } .content-title-item { height: 100%; width: 50px; flex-shrink: 0; border-bottom: 1px solid #eeeeee; box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex-direction: column; position: relative; } .content-title-item .month { font-size: 12px; color: #3a7bfa; box-sizing: border-box; padding: 0 1px; border-radius: 50%; background: #d6e4ff; text-align: center; line-height: 22px; } .content-title-item .day { font-size: 14px; color: #333333; /* margin-right: 4px; */ } .content-title-item .week { font-size: 12px; color: #999999; } .content-body { display: flex; align-items: center; } .content-body-item { height: 70px; width: 50px; flex-shrink: 0; font-size: 12px; box-sizing: border-box; padding: 4px; border-right: 1px solid #eeeeee; border-bottom: 1px solid #eeeeee; } .work-box { width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-around; background: #edeff2; border-radius: 8px 8px 8px 8px; color: #999; font-size: 14px; } .work-box.type0 { background: rgba(58, 123, 250, 0.15); color: #3a7bfa !important; } .work-box.type0 span { color: #3a7bfa !important; } .work-box.type1 { background: #e3dcfe; color: #635998 !important; } .work-box.type1 span { color: #635998 !important; } .work-box.type2 { background: #fae2ca; color: #bc8d5e !important; } .work-box.type2 span { color: #bc8d5e !important; } .work-box.type3 { background: #e1f3d8; color: #67c23a !important; } .work-box.type3 span { color: #67c23a !important; } .work-box.type4 { background: #fde2e2; color: #f56c6c !important; } .work-box.type4 span { color: #f56c6c !important; } .work-box.type5 { background: #ff46c145; color: #ff46c0 !important; } .work-box.type5 span { color: #ff46c0 !important; } .work-box.type6 { background: #00036418; color: #000464 !important; } .work-box.type6 span { color: #000464 !important; } .work-box-left { display: flex; justify-content: center; flex-direction: column; line-height: 24px; } .content-user { width: 100%; height: 70px; box-sizing: border-box; border-bottom: 1px solid #eeeeee; display: flex; align-items: center; } .user-pic { width: 40px; height: 40px; border-radius: 50%; background: #c0c4cc; color: #fff; font-size: 18px; text-align: center; line-height: 40px; margin-left: 10px; } .user-info { flex: 1; margin-left: 10px; } .hoverType { background: rgba(58, 123, 250, 0.03); } .year-table { width: 100%; } /* .year-table .scroll-right{ width: calc(100% -220px); } */ .year-table .scroll-right { flex: 1; } .year-table .month { font-size: 14px; color: #3a7bfa; box-sizing: border-box; padding: 0 4px; border-radius: 50%; background: #d6e4ff; text-align: center; line-height: 30px; } .year-table .content-title-item { width: 100%; } .year-table .content-body { /* width: calc(100% -220px) !important; */ } .year-table .content-body-item { width: 100%; height: 70px; display: flex; align-items: center; flex-direction: column; justify-content: center; } </style> src/views/performance/manHour/workTimeConfig.vue
@@ -139,7 +139,7 @@ }, mounted() { this.entityCopy = this.HaveJson(this.componentData.entity); this.getPower(); //this.getPower(); this.obtainItemParameterList(); this.selectEnumByCategoryForUnit(); }, @@ -174,30 +174,30 @@ this.page.current = 1; this.getList(); }, getPower(radio) { let power = JSON.parse(sessionStorage.getItem("power")); let up = false; let del = false; let add = false; for (var i = 0; i < power.length; i++) { if (power[i].menuMethod == "upDeviceParameter") { up = true; } if (power[i].menuMethod == "delDeviceParameter") { del = true; } if (power[i].menuMethod == "addDeviceParameter") { add = true; } } if (!up) { this.componentData.do.splice(1, 1); } if (!del) { this.componentData.do.splice(0, 1); } this.addPower = add; }, // getPower(radio) { // let power = JSON.parse(sessionStorage.getItem("power")); // let up = false; // let del = false; // let add = false; // for (var i = 0; i < power.length; i++) { // if (power[i].menuMethod == "upDeviceParameter") { // up = true; // } // if (power[i].menuMethod == "delDeviceParameter") { // del = true; // } // if (power[i].menuMethod == "addDeviceParameter") { // add = true; // } // } // if (!up) { // this.componentData.do.splice(1, 1); // } // if (!del) { // this.componentData.do.splice(0, 1); // } // this.addPower = add; // }, openAdd() { // this.$refs.ValueTable0.openAddDia( // this.$api.auxiliaryWorkingHours.insertAuxiliaryWorkingHours src/views/performance/staffAttendance/index.vue
src/views/performance/staffEvaluate/employee-mutual-evaluation.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,220 @@ <template> <div class="table-item"> <p style="text-align: center;margin-bottom: 10px;">{{ entity.departLims }} {{ Number(entity.month.split('-')[1]) }} æä»½åå·¥äºè¯æå表</p> <el-table :data="tableData" style="width: 100%" height="380" v-loading="loading"> <el-table-column type="index" label="åºå·" width="55"> </el-table-column> <el-table-column label="å§å"> </el-table-column> <el-table-column label="æ£æµåæ¶æ§"> <el-table-column label="忶宿"> <el-table-column label="20" width="90px"> <template slot-scope="scope"> <el-radio :label="20" v-model="scope.row.seasonable" @input="m=>handleChange(m,scope.row,'seasonable')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="å¬ä¿å®æ"> <el-table-column label="15" width="90px"> <template slot-scope="scope"> <el-radio :label="15" v-model="scope.row.seasonable" @input="m=>handleChange(m,scope.row,'seasonable')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="å»¶æè¾é¿"> <el-table-column label="10" width="90px"> <template slot-scope="scope"> <el-radio :label="10" v-model="scope.row.seasonable" @input="m=>handleChange(m,scope.row,'seasonable')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> </el-table-column> <el-table-column label="æ£æµåç¡®æ§"> <el-table-column label="å ¨ææ é"> <el-table-column label="20" width="90px"> <template slot-scope="scope"> <el-radio :label="20" v-model="scope.row.exact" @input="m=>handleChange(m,scope.row,'exact')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="å¶æå¤±è¯¯"> <el-table-column label="15" width="90px"> <template slot-scope="scope"> <el-radio :label="15" v-model="scope.row.exact" @input="m=>handleChange(m,scope.row,'exact')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="é¢ç¹é误"> <el-table-column label="10" width="90px"> <template slot-scope="scope"> <el-radio :label="10" v-model="scope.row.exact" @input="m=>handleChange(m,scope.row,'exact')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> </el-table-column> <el-table-column label="æä½æè½"> <el-table-column label="æä½çç»"> <el-table-column label="20" width="90px"> <template slot-scope="scope"> <el-radio :label="20" v-model="scope.row.skill" @input="m=>handleChange(m,scope.row,'skill')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="æä½åºæ¬çç»"> <el-table-column label="15" width="120px"> <template slot-scope="scope"> <el-radio :label="15" v-model="scope.row.skill" @input="m=>handleChange(m,scope.row,'skill')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="éè¦æå¯¼"> <el-table-column label="12" width="90px"> <template slot-scope="scope"> <el-radio :label="12" v-model="scope.row.skill" @input="m=>handleChange(m,scope.row,'skill')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> </el-table-column> <el-table-column label="设å¤ç»´æ¤"> <el-table-column label="èªè§ç»´æ¤"> <el-table-column label="10" width="90px"> <template slot-scope="scope"> <el-radio :label="10" v-model="scope.row.preserve" @input="m=>handleChange(m,scope.row,'preserve')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="è½ç»´æ¤"> <el-table-column label="5" width="80px"> <template slot-scope="scope"> <el-radio :label="5" v-model="scope.row.preserve" @input="m=>handleChange(m,scope.row,'preserve')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="æ æè¯"> <el-table-column label="2" width="80px"> <template slot-scope="scope"> <el-radio :label="2" v-model="scope.row.preserve" @input="m=>handleChange(m,scope.row,'preserve')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> </el-table-column> <el-table-column label="éµç« å®çºª"> <el-table-column label="èªè§éµå®" > <el-table-column label="10" width="90px"> <template slot-scope="scope"> <el-radio :label="10" v-model="scope.row.discipline" @input="m=>handleChange(m,scope.row,'discipline')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="被å¨éµå®"> <el-table-column label="7" width="90px"> <template slot-scope="scope"> <el-radio :label="7" v-model="scope.row.discipline" @input="m=>handleChange(m,scope.row,'discipline')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="ç»å¸¸è¿çºª"> <el-table-column label="5" width="90px"> <template slot-scope="scope"> <el-radio :label="5" v-model="scope.row.discipline" @input="m=>handleChange(m,scope.row,'discipline')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> </el-table-column> <el-table-column label="å¢ç»åä½"> <el-table-column label="å¢ç»åä½"> <el-table-column label="10" width="90px"> <template slot-scope="scope"> <el-radio :label="10" v-model="scope.row.solidarity" @input="m=>handleChange(m,scope.row,'solidarity')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="åºæ¬èæ´½"> <el-table-column label="8" width="90px"> <template slot-scope="scope"> <el-radio :label="8" v-model="scope.row.solidarity" @input="m=>handleChange(m,scope.row,'solidarity')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> </el-table-column> <el-table-column label="5S-3å®"> <el-table-column label="å å¹²åºæ´æ´"> <el-table-column label="10" width="110px"> <template slot-scope="scope"> <el-radio :label="10" v-model="scope.row.tidy" @input="m=>handleChange(m,scope.row,'tidy')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> <el-table-column label="åå¨ä¸æ¸ æ´ç¹"> <el-table-column label="7" width="130px"> <template slot-scope="scope"> <el-radio :label="7" v-model="scope.row.tidy" @input="m=>handleChange(m,scope.row,'tidy')">{{ '' }}</el-radio> </template> </el-table-column> </el-table-column> </el-table-column> <el-table-column label="å¾å" fixed="right"> <el-table-column label="100" width="70px" prop="total"> </el-table-column> </el-table-column> </el-table> </div> </template> <script> import { getEvaluateGroup } from '../../../api/cnas/performance/staffEvaluate' export default { props:{ entity:Object, }, data(){ return{ tableData:[], loading:false, } }, created(){ this.refreshTable() }, methods:{ handleChange(value,row,prop){ row[prop] = Number(value) getEvaluateGroup(...row).then(res => { row.total = res.data }) }, refreshTable(){ this.loading = true getEvaluateGroup(this.entity).then(res => { this.loading = false this.tableData = res.data }) }, refresh(){ this.refreshTable() } } } </script> <style scoped> .table-item{ width: 100%; height: 100%; } >>>.el-table--border th.el-table__cell, .el-table__fixed-right-patch{ border-color: rgb(225, 223, 223); } >>>.el-table .cell, .el-table--border .el-table__cell .cell{ text-align: center; } </style> src/views/performance/staffEvaluate/evaluation.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,91 @@ <template> <div class="table-item"> <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'" :page="page" @pagination="pagination" ></lims-table> </div> </template> <script> import limsTable from "@/components/Table/lims-table.vue"; import { page } from '../../../api/cnas/performance/staffEvaluate' export default { components: { limsTable, }, props: { entity : { type: Object, default: () => { return {}; }, } }, data() { return { tableData: [], tableLoading: false, column: [ { label: "å·¥å·", prop: "account" }, { label: "å§å", prop: "name" }, { label: "åå·¥äºè¯", prop: "groupTotal", }, { label: "ç»é¿è¯å", prop: "leaderTotal" }, { label: "主管è¯å", prop: "competentTotal" }, { label: "èè¯å¾å", prop: "score" }, { label: "èè¯ç级", prop: "grade" }, ], page: { total: 0, size: 10, current: 0, }, }; }, methods: { getList() { this.tableLoading = true; let param = { ...this.entity, ...this.page }; delete param.total; page({ ...param }) .then((res) => { this.tableLoading = false; if (res.code === 200) { this.tableData = res.data.records; this.page.total = res.data.total; } }) .catch((err) => { this.tableLoading = false; }); }, pagination({ page, limit }) { this.page.current = page; this.page.size = limit; this.getList(); }, refreshTable() { this.getList(); } }, mounted() {}, }; </script> <style scoped> .table-item { width: 100%; height: 100%; } </style> src/views/performance/staffEvaluate/index.vue
@@ -1,9 +1,225 @@ <template> <div>人åèè¯</div> <div class="personnel-evaluation"> <basicContainer> <div class="search"> <div class="search_thing"> <div class="search_label">æä»½ï¼</div> <div class="search_input"> <el-date-picker v-model="entity.month" format="yyyy-MM" placeholder="éæ©æ" size="small" type="month" value-format="yyyy-MM" @change="refreshTable()"> </el-date-picker> </div> </div> <div class="search_thing"> <div class="search_label">å®éªå®¤ï¼</div> <div class="search_input"> <el-select v-model="entity.departLims" placeholder="å ¨é¨" size="small" @change="refreshTable()"> <el-option v-for="item in laboratoryList" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </div> </div> <div class="search_thing"> <div class="search_label">人ååç§°ï¼</div> <div class="search_input"><el-input v-model="entity.name" clearable placeholder="请è¾å ¥" size="small" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing" style="padding-left: 30px;"> <el-button size="small" @click="refresh()">é ç½®</el-button> <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> </div> </div> <div class="tabs" style="margin-top: 10px;"> <el-radio-group v-model="tabValue" size="small" > <el-radio-button v-hasPermi="['staffEvaluate:evaluation:list']" label="evaluation">èè¯</el-radio-button> <el-radio-button v-hasPermi="['staffEvaluate:employeeMutualEvaluation:list']" label="employeeMutualEvaluation">åå·¥äºè¯</el-radio-button> <el-radio-button v-hasPermi="['staffEvaluate:leaderRate:list']" label="leaderRate">ç»é¿è¯å</el-radio-button> <el-radio-button v-hasPermi="['staffEvaluate:supervisorRate:list']" label="supervisorRate">主管æå</el-radio-button> </el-radio-group> <el-button :loading="outLoading" size="small" type="primary" @click="handleDown">导 åº</el-button> </div> </basicContainer> <div class="table"> <component :is="tabValue" v-if="laboratoryList.length>0" ref="component" :entity="entity"></component> </div> </div> </template> <script> export default {}; import evaluation from '../staffEvaluate/evaluation.vue' import employeeMutualEvaluation from '../staffEvaluate/employee-mutual-evaluation.vue' import leaderRate from '../staffEvaluate/leader-rate.vue' import supervisorRate from '../staffEvaluate/supervisor-rate.vue' import { obtainItemParameterList, exportEvaluate, exportEvaluateLeader, exportEvaluateCompetent } from '../../../api/cnas/performance/staffEvaluate' export default { components: { evaluation, employeeMutualEvaluation, leaderRate, supervisorRate, }, data(){ return{ // isPermission: isPermission, entity:{ month:new Date().getFullYear()+'-'+((new Date().getMonth() + 1) < 10 ? '0'+(new Date().getMonth() + 1):(new Date().getMonth() + 1)), departLims:'', name:'' }, tabValue:'evaluation', laboratoryList:[], outLoading:false, copyEntity:null } }, created(){ this.obtainItemParameterList() this.tabValue = this.initTabValueByPermissions() }, methods: { initTabValueByPermissions(){ // const per1 = this.isPermission('page')//æ¥è¯¢èè¯ // const per2 = this.isPermission('getEvaluateGroup')//åå·¥äºè¯ // const per3 = this.isPermission('getEvaluateLeader')//ç»é¿è¯å // const per4 = this.isPermission('getEvaluateCompetent')//主管æå // return per1?'evaluation':per2?'employeeMutualEvaluation':per3?'leaderRate':per4?'supervisorRate':'' return 'evaluation' }, refreshTable(){ this.$refs.component.refreshTable() }, refresh(){ this.entity = this.HaveJson(this.copyEntity) this.$refs.component.refresh() }, obtainItemParameterList() { obtainItemParameterList().then(res => { let data = [] res.data.forEach(a => { data.push({ label: a.laboratoryName, value: a.laboratoryName }) }) this.laboratoryList = data this.entity.departLims = data[0].value this.copyEntity = this.HaveJson(this.entity) }) }, handleDown(){ let url = null; let title = '' if(this.tabValue=='evaluation'){ url = exportEvaluate title = 'èè¯è¡¨' }else if(this.tabValue=='employeeMutualEvaluation'){ url = exportEvaluate title = 'èè¯è¡¨' }else if(this.tabValue=='leaderRate'){ url = exportEvaluateLeader title = 'ç»é¿è¯å表' }else if(this.tabValue=='supervisorRate'){ url = exportEvaluateCompetent title = '主管è¯å表' } let entity = {...this.entity} this.outLoading = true url(entity).then(res => { this.outLoading = false const blob = new Blob([res],{ type: 'application/octet-stream' }); //å°Blob å¯¹è±¡è½¬æ¢æå符串 let reader = new FileReader(); reader.readAsText(blob, 'utf-8'); reader.onload = () => { try { let result = JSON.parse(reader.result); if (result.message) { this.$message.error(result.message); } else { const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = entity.departLims+'-'+entity.month+title+'.xlsx'; link.click(); this.$message.success('å¯¼åºæå') } } catch (err) { console.log(err); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = entity.departLims+'-'+entity.month+title+'.xlsx'; link.click(); this.$message.success('å¯¼åºæå') } } }) }, } } </script> <style></style> <style scoped> .personnel-evaluation { height: 100%; overflow-y: auto; } .title { height: 60px; line-height: 60px; } .search { background-color: #ffffff; height: 80px; display: flex; align-items: center; margin-top: 20px; } .search_thing { width: 350px; display: flex; align-items: center; } .search_label { width: 110px; font-size: 14px; text-align: right; } .search_input { width: calc(100% - 110px); } .tabs{ display: flex; align-items: center; justify-content: space-between; } .table { margin-top: 10px; background-color: #ffffff; width: calc(100% - 40px); height: calc(100% - 60px - 80px - 10px - 42px); padding: 20px; } </style> src/views/performance/staffEvaluate/leader-rate.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,155 @@ <template> <div class="table-item"> <p style="text-align: center; margin-bottom: 10px"> {{ entity.departLims }} {{ Number(entity.month.split("-")[1]) }} æä»½ç»é¿æå表 </p> <el-table :data="tableData" style="width: 100%" height="380" v-loading="loading" > <el-table-column type="index" label="åºå·" width="55"> </el-table-column> <el-table-column label="å§å" prop="name"> </el-table-column> <el-table-column label="å·¥ä½è´£ä»»å¿"> <el-table-column label="25"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.responsibility" @change="(m) => handleChange(m, scope.row, 'responsibility')" :min="0" :max="25" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="æä»åå·¥"> <el-table-column label="25"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.compliance" @change="(m) => handleChange(m, scope.row, 'compliance')" :min="0" :max="25" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="ç§¯ææ§"> <el-table-column label="20"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.positive" @change="(m) => handleChange(m, scope.row, 'positive')" :min="0" :max="20" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="å¢ç»åäº"> <el-table-column label="10"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.solidarity" @change="(m) => handleChange(m, scope.row, 'solidarity')" :min="0" :max="10" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="è¯éªåæ¶æ§"> <el-table-column label="10"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.seasonable" @change="(m) => handleChange(m, scope.row, 'seasonable')" :min="0" :max="10" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="ç»æåç¡®æ§"> <el-table-column label="10"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.exact" @change="(m) => handleChange(m, scope.row, 'exact')" :min="0" :max="10" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="å¾å" prop="total"> </el-table-column> </el-table> </div> </template> <script> import { writeEvaluateLeader, getEvaluateLeader, } from "../../../api/cnas/performance/staffEvaluate"; export default { props: { entity: Object, }, data() { return { tableData: [], loading: false, }; }, created() { this.refreshTable(); }, methods: { handleChange(value, row, prop) { row[prop] = Number(value); writeEvaluateLeader({ ...row }).then((res) => { row.total = res.data; }); }, refreshTable() { this.loading = true; getEvaluateLeader(this.entity).then((res) => { this.loading = false; this.tableData = res.data; }); }, refresh() { this.refreshTable(); }, }, }; </script> <style scoped> .table-item { width: 100%; height: 100%; } >>> .el-table--border th.el-table__cell, .el-table__fixed-right-patch { border-color: rgb(225, 223, 223); } >>> .el-table .cell, .el-table--border .el-table__cell .cell { text-align: center; } .el-input-number { width: 110px; } </style> src/views/performance/staffEvaluate/supervisor-rate.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,168 @@ <template> <div class="table-item"> <p style="text-align: center; margin-bottom: 10px"> {{ entity.departLims }} {{ Number(entity.month.split("-")[1]) }} æä»½ä¸»ç®¡æå表 </p> <el-table :data="tableData" style="width: 100%" height="380" v-loading="loading" > <el-table-column type="index" label="åºå·" width="55"> </el-table-column> <el-table-column label="å§å" prop="name"> </el-table-column> <el-table-column label="æè½æ°´å¹³"> <el-table-column label="20"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.skill" @change="(m) => handleChange(m, scope.row, 'skill')" :min="0" :max="20" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="æä»åå·¥"> <el-table-column label="20"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.compliance" @change="(m) => handleChange(m, scope.row, 'compliance')" :min="0" :max="20" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="ç§¯ææ§"> <el-table-column label="20"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.positive" @change="(m) => handleChange(m, scope.row, 'positive')" :min="0" :max="20" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="5S-3å®"> <el-table-column label="10"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.tidy" @change="(m) => handleChange(m, scope.row, 'tidy')" :min="0" :max="10" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="è§ç« å¶åº¦"> <el-table-column label="10"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.discipline" @change="(m) => handleChange(m, scope.row, 'discipline')" :min="0" :max="10" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="å¢ç»åä½"> <el-table-column label="10"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.solidarity" @change="(m) => handleChange(m, scope.row, 'solidarity')" :min="0" :max="10" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="ææ¡ç§¯å"> <el-table-column label="10"> <template slot-scope="scope"> <el-input-number size="small" v-model="scope.row.proposal" @change="(m) => handleChange(m, scope.row, 'proposal')" :min="0" :max="10" ></el-input-number> </template> </el-table-column> </el-table-column> <el-table-column label="å¾å" prop="total"> </el-table-column> </el-table> </div> </template> <script> import { getEvaluateCompetent, writeEvaluateCompetent, } from "../../../api/cnas/performance/staffEvaluate"; export default { props: { entity: Object, }, data() { return { tableData: [], loading: false, }; }, created() { this.refreshTable(); }, methods: { handleChange(value, row, prop) { row[prop] = Number(value); writeEvaluateCompetent(...row).then((res) => { row.total = res.data; }); }, refreshTable() { this.loading = true; getEvaluateCompetent(this.entity).then((res) => { this.loading = false; this.tableData = res.data; }); }, refresh() { this.refreshTable(); }, }, }; </script> <style scoped> .table-item { width: 100%; height: 100%; } >>> .el-table--border th.el-table__cell, .el-table__fixed-right-patch { border-color: rgb(225, 223, 223); } >>> .el-table .cell, .el-table--border .el-table__cell .cell { text-align: center; } .el-input-number { width: 110px; } </style> vue.config.js
@@ -36,7 +36,7 @@ proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { target: `http://192.168.0.104:8002`, target: `http://127.0.0.1:8002`, // target: `http://127.0.0.1:8002`, changeOrigin: true, pathRewrite: {