diff --git a/src/components/DataTable.vue b/src/components/DataTable.vue index ed14f610c15274e6465d5a14fecc68c370bdc445..beb7e2c685fd199529581e50fca4bc3c1972b358 100644 --- a/src/components/DataTable.vue +++ b/src/components/DataTable.vue @@ -97,11 +97,11 @@ export default { required: false, default: () => {}, }, - tableRowClassName: { - type: Function, - required: false, - default: () => {}, - }, + // tableRowClassName: { + // type: Function, + // required: false, + // default: () => {}, + // }, loading: { type: Boolean, required: false, @@ -143,7 +143,7 @@ export default { // } }, toggleRowSelection: { - handler: function(v) { + handler: function (v) { v.forEach((element) => { this.$refs.eltable.toggleRowSelection(element, true); }); @@ -152,7 +152,13 @@ export default { immediate: true, }, }, - methods: {}, + methods: { + tableRowClassName({ row }) { + if (row.dataType == 2) { + return "red"; + } + }, + }, data() { return { emptytxt: "", @@ -160,3 +166,8 @@ export default { }, }; </script> +<style lang="less" scoped> +/deep/.el-table .red { + background: rgba(255, 233, 233); +} +</style> diff --git a/src/components/FormField.vue b/src/components/FormField.vue index 44f766c8c0bc6c09f3fb58c397ab64239d52193e..324198fd76a0628214ad83b08e9f80432e0b160a 100644 --- a/src/components/FormField.vue +++ b/src/components/FormField.vue @@ -34,6 +34,7 @@ :placeholder="placeholder" @change="emit" @input="emit" + :min="min" v-if="type === 'num'" ></el-input-number> @@ -50,7 +51,34 @@ :autosize="textareaSize" :class="inputClass" ></el-input> - + <el-select + v-model="field" + :clearable="true" + @change="salaChange" + v-if="type === 'selectSalaId'" + :placeholder="'璇烽€夋嫨澶у巺'" + > + <el-option + :label="label.deptName" + :value="label.id" + v-for="(label, value) in salaArr" + :key="value" + ></el-option> + </el-select> + <el-select + v-model="field" + :clearable="true" + @change="deptChange" + v-if="type === 'selectDeptId'" + :placeholder="'璇烽€夋嫨閮ㄩ棬'" + > + <el-option + :label="label.deptName" + :value="label.id" + v-for="(label, value) in deptArr" + :key="value" + ></el-option> + </el-select> <!-- 涓€绾� --> <el-select :disabled="disabled" @@ -60,7 +88,7 @@ :filterable="filterable" :clearable="clearable" v-if="type === 'select'" - style="width: 100%;" + style="width: 100%" > <el-option v-for="($label, $value) in enumData" @@ -103,7 +131,7 @@ v-for="($label, $value) in enumData" :key="$value" :label="$value" - style="margin-bottom: 10px;" + style="margin-bottom: 10px" >{{ $label }}</el-radio > </el-radio-group> @@ -112,13 +140,13 @@ v-model="field" @change="emit" v-if="type === 'radioCol'" - style="display: flex;margin-top: 12px;" + style="display: flex; margin-top: 12px" > <el-radio v-for="($label, $value) in enumData" :key="$value" :label="$value" - style="margin-bottom: 15px;" + style="margin-bottom: 15px" >{{ $label }}</el-radio > </el-radio-group> @@ -145,9 +173,35 @@ @change="emit" @input="emit" placeholder="閫夋嫨鏃ユ湡" - style="width: 100%;" + style="width: 100%" v-if="type === 'date'" ></el-date-picker> + <el-date-picker + :disabled="disabled" + type="month" + v-model="field" + @change="emit" + @input="emit" + placeholder="閫夋嫨鏈�" + style="width: 100%" + v-if="type === 'month'" + :append-to-body="false" + popper-class="due_month" + value-format="M" + format="M鏈�" + ></el-date-picker> + <el-date-picker + :disabled="disabled" + type="year" + v-model="field" + @change="emit" + @input="emit" + placeholder="閫夋嫨骞�" + value-format="yyyy" + format="yyyy骞�" + style="width: 100%" + v-if="type === 'year'" + ></el-date-picker> <el-date-picker :disabled="disabled" type="datetime" @@ -157,7 +211,7 @@ @input="emit" placeholder="閫夋嫨鏃ユ湡" v-if="type === 'datetime'" - style="width: 100%;" + style="width: 100%" ></el-date-picker> </slot> </el-form-item> @@ -242,6 +296,14 @@ export default { maxLength: { type: Number, }, + min: { + type: Number, + }, + }, + created() { + if (this.type == "selectDeptId" || this.type == "selectSalaId") { + this.getArr(); + } }, methods: { emit() { @@ -250,15 +312,53 @@ export default { //this.$emit('focus', this.newVal) this.$emit("cascaderChange", this.newVal); }, + deptChange() { + this.page = 1; + }, + salaChange() { + this.$get("/dept/getDeptBySalaId", { salaId: this.form.salaId }) + .then((res) => { + if (res.code == 1) { + this.deptArr = res.data.data; + this.page = 1; + } + }) + .catch((error) => { + this.$message.error(error.message); + }); + }, + getArr() { + this.$get("/dept/getSalaList") + .then((res) => { + if (res.code == 1) { + this.salaArr = res.data.data; + } + }) + .catch((error) => { + this.$message.error(error.message); + }); + this.$get("/dept/getDeptBySalaId") + .then((res) => { + if (res.code == 1) { + this.deptArr = res.data.data; + console.log(123); + } + }) + .catch((error) => { + this.$message.error(error.message); + }); + }, }, computed: { field: { get() { if (Array.isArray(this.value)) { this.value = this.value.map((v) => { - return typeof v == 'number' ? v + "" : v; + return typeof v == "number" ? v + "" : v; }); } + console.log(this.value); + return this.value; }, set(val) { @@ -270,7 +370,15 @@ export default { data() { return { newVal: this.value, + salaArr: [], + deptArr: [], + page: 1, }; }, }; </script> +<style lang="less" scoped> +/deep/.due_month .el-date-picker__header { + display: none; +} +</style> diff --git a/src/components/SearchFormDrawer.vue b/src/components/SearchFormDrawer.vue index 8ca1266e3f04771f4a0dbccffc04660d82312b22..6a63022bba53c78e14a2d7152606a48dc1f48b9f 100644 --- a/src/components/SearchFormDrawer.vue +++ b/src/components/SearchFormDrawer.vue @@ -77,11 +77,6 @@ v-if="item.type === 'selectDeptId'" :placeholder="'璇烽€夋嫨' + item.label" > - <!-- <el-option - label="" - value="" - v-if="!item.multiple && !item.notShowAll" - ></el-option> --> <el-option :label="label.deptName" :value="label.id" diff --git a/src/router.js b/src/router.js index 54346363c8a5ee0c5e4a178bf228f48608022581..b729aaa4c5ae820135083b573f1c83649507bc65 100644 --- a/src/router.js +++ b/src/router.js @@ -151,6 +151,7 @@ const router = new Router({ ...restBuilder("feedback/answer/option", "feedback/answer/option"), //鍥炵瓟闂閫夐」 ...restBuilder("staff/perform/summary", "staff/perform/summary"), //鍛樺伐缁╂晥缁熻姹囨€� + ...restBuilder("staff/perform/summary/edit", "staff/perform/summary/edit"), //浜哄憳缁╂晥缁熻姹囨€� ...restBuilder("window/perform/summary", "window/perform/summary"), //绐楀彛缁╂晥缁熻姹囨€� ...restBuilder("door", "door"), //闂ㄧ璁惧绠$悊 diff --git a/src/views/staff/perform/summary/edit/dialogshow.vue b/src/views/staff/perform/summary/edit/dialogshow.vue new file mode 100644 index 0000000000000000000000000000000000000000..ef6b7c80d5f40d806884445c236b5d9e8d724456 --- /dev/null +++ b/src/views/staff/perform/summary/edit/dialogshow.vue @@ -0,0 +1,520 @@ +<template> + <!-- 寮瑰嚭妗嗚〃鍗� --> + <el-dialog + :title="title" + :visible.sync="open" + width="50%" + height="300px" + append-to-body + :close-on-click-modal="false" + :close-on-press-escape="false" + > + <div class="userName"> + <div class="user-left"> + <div class="user-name"> + {{ form.staffName }} + </div> + <div class="user-info"> + <span class="user-i">宸ュ彿锛歿{ form.workNum }}</span> + <span class="user-i">鎵€灞為儴闂細{{ form.deptName }}</span> + </div> + </div> + <div class="user-right"> + <!-- <div class="n">{{ form.otherScore }}</div> + <div class="m">{{ form.month }}鏈堣嚜璇勭哗鏁堝緱鍒�</div> --> + <div class="n" style="margin-top: 10px; color: #409eff"> + {{ form.totalScore }} + </div> + <div class="m">{{ form.month }}鏈堢哗鏁堝緱鍒�</div> + <div class="m" style="color: #aaa"> + 缁╂晥鍒嗘暟鏇存柊鏃堕棿锛歿{ momentVal(form.updateTime) }} + </div> + </div> + </div> + <div class="dialog_box" v-if="pageInfo.type == 'view'"> + <div + class="userName user-t-item" + :class="{ t2: item.subAddType == 1, t1: item.subAddType == 2 }" + v-for="item in list" + :key="item.id" + > + <div class="user-left"> + <div class="user-name"> + {{ dictVal("checkType", item.checkType) }} + </div> + <div class="user-info"> + <span class="user-i">缁╂晥瑙勫垯锛歿{ item.ruleName }}</span> + </div> + <div class="user-info"> + <span class="user-i" + >{{ + item.subAddType == 1 + ? "鍔犲垎鏂瑰紡锛�" + : item.subAddType == 2 + ? "鎵e垎鏂瑰紡锛�" + : "鏂瑰紡锛�" + }}{{ util_formatter("subMethod", item.subMethod) }}</span + > + </div> + <div class="user-info" v-if="item.performType == 'attend'"> + <span class="user-i">寮傚父鏃堕棿锛歿{ momentVal(item.remark) }}</span> + </div> + <div class="user-info"> + <span class="user-i" + >鏍告煡鏃堕棿锛歿{ momentVal(item.checkTime) }}</span + > + </div> + <div class="user-info" v-if="item.auditStatus == 2"> + <span class="user-i" + >鏍告煡缁撴灉锛歿{ item.subAddType == 1 ? "+" : "-" + }}{{ item.score }}锛坽{ item.checkResult }}锛�</span + > + </div> + </div> + <div class="user-right"> + <div class="n"> + {{ item.subAddType == 1 ? "+" : "-" + }}{{ item.auditStatus == 2 ? 0 : item.score }} + </div> + </div> + </div> + </div> + <div class="dialog_box" v-else style="margin-top: 20px"> + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> + <el-row v-if="form.label == '澶囨敞1'"> + <el-col :span="2" style="width: 5.3333%"> <div>澶囨敞锛�</div></el-col> + <el-col :span="22"> + <span> + <el-input + type="textarea" + v-model="form.remark" + :autosize="{ minRows: 2, maxRows: 8 }" + placeholder="璇疯緭鍏ュ娉ㄥ唴瀹�" + style=" + font-family: 'Microsoft Yahei', 'Helvetica Neue', Helvetica, + STHeiTi, Arial, sans-serif; + " + ></el-input> + </span> + </el-col> + </el-row> + + <el-row v-if="form.label == '澶囨敞2'"> + <el-col :span="2" style="width: 5.3333%"> <div>澶囨敞锛�</div></el-col> + <el-col :span="22"> + <template v-if="typeof form.remarkAdd != 'string'"> + <div + class="attend_box" + v-for="(val, i) in form.remarkAdd" + :key="i" + > + <div class="text_box" style="width: 50%"> + <el-autocomplete + class="inline-input" + v-model="val.name" + :fetch-suggestions="querySearch" + placeholder="璇疯緭鍏ュ唴瀹�" + @select="handleSelect" + style="width: 100%" + clearable + @clear="handleClear(val)" + @blur="handleBlur" + ></el-autocomplete> + </div> + <div class="score_box"> + <el-input-number + v-model="val.score" + @blur="handleBlur" + @change="handleBlur" + controls-position="right" + ></el-input-number> + </div> + <div class="icon_box"> + <i + class="el-icon-circle-plus-outline" + style=" + width: 100%; + height: 100%; + font-size: 30px; + color: #409eff; + margin-right: 10px; + " + @click="handlePlus" + v-if="i + 1 == form.remarkAdd.length" + ></i> + <i + class="el-icon-remove-outline" + @click="handleRemove(i)" + style=" + width: 100%; + height: 100%; + font-size: 30px; + color: #f56c6c; + " + ></i> + </div> + </div> + </template> + </el-col> + </el-row> + </el-form> + </div> + <div + slot="footer" + class="dialog-footer" + style="display: flex; align-items: center" + > + <el-col :span="20"> + <el-col :span="4" style="width: 15.7%" v-if="form.label == '澶囨敞2'"> + <div>褰撳墠绱鍔犲垎锛�</div></el-col + > + <el-col :span="1" v-if="form.label == '澶囨敞2'" style="text-align: left"> + <span style="color: #f56c6c; font-weight: 600"> + {{ form.addTotalScore ? form.addTotalScore : 0 }} + </span> + </el-col> + </el-col> + <el-button + type="primary" + v-if="pageInfo.type !== 'view'" + @click="submitForm" + >纭� 瀹�</el-button + > + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> +</template> + +<script> +import form from "@/assets/mixins/formdialog"; +import dialogShow from "./dialogshow"; +import moment from "moment"; +export default { + mixins: [form], + components: { + dialogShow, + }, + data() { + return { + // 閬僵灞� + loading: true, + // 寮瑰嚭灞傛爣棰� + title: "鍛樺伐缁╂晥缁熻", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + toString: ["month"], + // 琛ㄥ崟鏍¢獙 + rules: {}, + list: [], + dict: {}, + rulesList: [], + }; + }, + + methods: { + handleBlur() { + this.form.addTotalScore = 0; + + this.form.remarkAdd && this.form.remarkAdd.length > 0 + ? this.form.remarkAdd.forEach((v) => { + if (v.name && v.name != "") { + v.score ? v.score : (v.score = 0); + this.form.addTotalScore += v.score; + } + }) + : ""; + this.form.addTotalScore = this.form.addTotalScore.toFixed(2); + this.$forceUpdate(); + }, + handlePlus() { + this.form.remarkAdd.push({ + name: "", + score: 0, + }); + }, + handleRemove(i) { + if (i == 0 && this.form.remarkAdd.length == 1) { + this.form.remarkAdd = [ + { + name: "", + score: 0, + }, + ]; + } else { + this.form.remarkAdd = this.form.remarkAdd.filter( + (v, index) => index != i + ); + } + this.handleBlur(); + }, + handleClear(val) { + val.name = ""; + val.score = 0; + }, + handleSelect(item) { + this.form.remarkAdd.forEach((val) => { + this.rulesList.forEach((v) => { + if (val.name == v.value) { + v.subAddType == 2 + ? (val.score = Number("-" + v.score)) + : (val.score = Number("+" + v.score)); + } + }); + }); + this.handleBlur(); + }, + querySearch(queryString, cb) { + let rulesList = this.rulesList; + let results = queryString + ? rulesList.filter(this.createFilter(queryString)) + : rulesList; + // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹� + cb(results); + }, + createFilter(queryString) { + return (rule) => { + return ( + rule.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0 + ); + }; + }, + // 鏃ユ湡 + momentVal(v) { + return moment(v).format("YYYY-MM-DD HH:SS"); + }, + // 瀛楀吀杞崲 + dictVal(key, val) { + return this.dict[key][val]; + }, + /** 鏌ョ湅姹囨€� */ + checkAll(id) { + this.$post("/check/all/record/list", { + checkStatus: 2, + staffId: id, + checkTimeStart: this.$route.query.yearmonth + ? this.$route.query.yearmonth + "-01" + : "", + checkTimeEnd: this.$route.query.yearmonth + ? this.$route.query.yearmonth + "-31" + : "", + }).then((res) => { + const { code, data, dict } = res; + if (code == 1) { + const row = data.data || []; + //deductTime鐢宠瘔鏃堕棿 checkTime 鏍告煡鏃堕棿 ruleName瑙勫垯checkType瀛楀吀 subAddType锛�1澧炲姞2鍑弒core + this.list = row; + this.dict = dict; + this.open = true; + } + }); + }, + /** 缂栬緫 */ + async edit(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "staff/perform/summary/edit/edit"; + this.pageInfo.type = "edit"; + this.title = "鍛樺伐缁╂晥缁熻"; + await this.getData(); + row.label && row.label != "" ? (this.form.label = row.label) : ""; + this.$nextTick(async () => { + if (row.label == "澶囨敞2") { + await this.$post("/perform/rules/list", { size: -1 }).then( + async (res) => { + if (res.code == 1) { + this.rulesList = res.data.data; + this.rulesList && this.rulesList.length > 0 + ? this.rulesList.forEach((v) => { + v.value = v.name + "--" + v.content; + }) + : ""; + if ( + this.form.remarkAdd === "[]" || + this.form.remarkAdd == undefined || + this.form.remarkAdd == null || + this.form.remarkAdd.length == 0 || + this.form.remarkAdd == "" + ) { + this.form.remarkAdd = [ + { + name: "", + score: 0, + }, + ]; + console.log(this.form.remarkAdd); + + this.handleBlur(); + this.$forceUpdate(); + } else { + this.handleBlur(); + this.$forceUpdate(); + } + } + } + ); + } + }); + }, + /** 鏂板 */ + add(row) { + this.reset(); + this.urls.currUrl = "staff/perform/summary/edit/add"; + this.getData(); + this.pageInfo.type = "add"; + this.title = "鏂板鍛樺伐缁╂晥缁熻"; + }, + /** 鏌ョ湅*/ + view(row) { + this.reset(); + this.query = { + id: row.id, + }; + this.urls.currUrl = "staff/perform/summary/edit/view"; + this.getData(); + this.pageInfo.type = "view"; + this.title = "鍛樺伐缁╂晥缁熻璇︾粏"; + this.checkAll(row.staffId); + }, + /**鍙栨秷鎸夐挳 */ + cancel() { + this.open = false; + this.reset(); + }, + /**鑾峰彇鏁版嵁鍚庡脊妗� */ + afterRender(data) { + this.pageInfo.type != "view" ? (this.open = true) : ""; + }, + + afterSubmit(data) { + this.open = false; + this.$emit("ok"); + }, + + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + staffId: 0, + workNum: "", + staffName: "", + deptId: 0, + deptName: "", + attendScore: null, + assessScore: null, + workScore: null, + effectScore: null, + otherScore: null, + errorScore: null, + totalScore: null, + remark: "", + year: null, + month: null, + remarkAdd: "[]", + addTotalScore: 0, + }; + this.resetForm("form"); + }, + resetForm(refName) { + if (this.$refs[refName]) { + this.$refs[refName].resetFields(); + } + }, + }, +}; +</script> +<style lang="less" scoped> +.userName { + background: rgba(242, 246, 252, 1); + display: flex; + align-items: center; + padding: 15px; + + .user-left { + flex: 1; + } + + .user-name { + font-size: 18px; + font-weight: bold; + } + + .user-info { + margin-top: 10px; + + .user-i { + margin-right: 40px; + } + } + + .user-right { + text-align: center; + + .n { + font-size: 16px; + font-weight: bold; + } + + .m { + font-size: 12px; + } + } +} + +.user-t-item { + margin-top: 20px; + border-left: 4px solid #ff4242; +} + +.t1 { + border-color: #ff4242; + background: rgba(255, 66, 66, 0.07); + + .user-name, + .n { + color: #ff4242; + } +} +.t2 { + border-color: rgba(27, 198, 167, 1); + background: rgba(27, 198, 167, 0.07); + + .user-name, + .n { + color: rgba(27, 198, 167, 1); + } +} + +/deep/.el-dialog__body { + height: 650px; + .dialog_box { + height: 85%; + overflow-y: auto; + .attend_box { + display: flex; + align-items: center; + margin-bottom: 20px; + .score_box { + margin: 0 15px; + } + .icon_box { + display: flex; + } + + /deep/.el-input__inner { + width: 100%; + } + } + /deep/.el-autocomplete { + width: 100% !important; + } + } + + /deep/.el-textarea input::-moz-input-placeholder { + font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, STHeiTi, Arial, + sans-serif !important; + } + /deep/.el-textarea input::-webkit-input-placeholder { + font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, STHeiTi, Arial, + sans-serif !important; + } +} +</style> diff --git a/src/views/staff/perform/summary/edit/drawershow.vue b/src/views/staff/perform/summary/edit/drawershow.vue new file mode 100644 index 0000000000000000000000000000000000000000..dbd0ee119619126ad0dc458bc31a8a126c5b0108 --- /dev/null +++ b/src/views/staff/perform/summary/edit/drawershow.vue @@ -0,0 +1,586 @@ +<template> + <!-- 寮瑰嚭妗嗚〃鍗� --> + <el-drawer + :title="title" + :visible.sync="open" + :direction="direction" + size="50%" + > + <el-form + ref="form" + :model="form" + :rules="rules" + label-width="120px" + style="padding: 0 20px" + > + <el-row> + <Field + label="鑰冭瘎骞翠唤" + prop="year" + v-model="form.year" + type="year" + placeholder="璇烽€夋嫨鑰冭瘎骞翠唤" + /> + <Field + label="鑰冭瘎鏈堜唤" + prop="month" + type="month" + v-model="form.month" + placeholder="璇烽€夋嫨鑰冭瘎鏈堜唤" + /> + </el-row> + <el-row> + <Field + label="鍛樺伐濮撳悕" + prop="staffName" + v-model="form.staffName" + placeholder="璇疯緭鍏ュ憳宸ュ鍚�" + /> + <Field + label="宸ュ彿" + prop="workNum" + v-model="form.workNum" + placeholder="璇疯緭鍏ュ伐鍙�" + /> + </el-row> + <el-row> + <Field label="鎵€灞炲ぇ鍘�" prop="salaId"> + <el-select + v-model="form.salaId" + :clearable="true" + @change="salaChange" + :placeholder="'璇烽€夋嫨澶у巺'" + > + <el-option + :label="label.deptName" + :value="label.id" + v-for="(label, value) in salaArr" + :key="value" + ></el-option> + </el-select> + </Field> + <Field label="鎵€灞為儴闂�" prop="deptId"> + <el-select + v-model="form.deptId" + :clearable="true" + @change="deptChange" + :placeholder="'璇烽€夋嫨閮ㄩ棬'" + > + <el-option + :label="label.deptName" + :value="label.id" + v-for="(label, value) in deptArr" + :key="value" + ></el-option> + </el-select> + </Field> + </el-row> + <el-row> + <Field + label="宸ヤ綔绾緥" + prop="effectScore" + type="num" + v-model="form.effectScore" + placeholder="璇疯緭鍏ュ伐浣滅邯寰嬪垎鏁�" + /> + <Field + label="鏈嶅姟瑙勮寖" + prop="attendScore" + type="num" + v-model="form.attendScore" + placeholder="璇疯緭鍏ユ湇鍔¤鑼冨垎鏁�" + /> + </el-row> + <el-row> + <Field + label="缁煎悎绠$悊" + prop="complainScore" + type="num" + v-model="form.complainScore" + placeholder="璇疯緭鍏ョ患鍚堢鐞嗗垎鏁�" + /> + <Field + label="缇や紬璇勮" + prop="reviewScore" + type="num" + v-model="form.reviewScore" + placeholder="璇疯緭鍏ョ兢浼楄瘎璁垎鏁�" + /> + </el-row> + <el-row> + <Field + label="宸ヤ綔鏁堣兘" + prop="goworkScore" + type="num" + v-model="form.goworkScore" + placeholder="璇疯緭鍏ュ伐浣滄晥鑳藉垎鏁�" + /> + <Field + label="鍏朵粬缁╂晥" + prop="otherScore" + type="num" + v-model="form.otherScore" + placeholder="璇疯緭鍏ュ叾浠栫哗鏁堝垎鏁�" + /> + </el-row> + <div class="bl_line"> + <span>{{ form.month }} 鏈堝緱鍒�</span> + <span>{{ + ( + form.otherScore + + form.goworkScore + + form.reviewScore + + form.complainScore + + form.attendScore + + form.effectScore + ).toFixed(2) + }}</span> + </div> + <el-row> + <Field + label="澶囨敞1" + prop="remark" + v-model="form.remark" + type="textarea" + placeholder="璇疯緭鍏ュ娉�1" + /> + </el-row> + <el-row style="padding-left: 70px"> + <el-col :span="3" style="width: 5.9%; font-size: 14px; color: #606266"> + <div>澶囨敞2</div></el-col + > + <el-col :span="20"> + <template v-if="typeof form.remarkAdd != 'string'"> + <div class="attend_box" v-for="(val, i) in form.remarkAdd" :key="i"> + <div class="text_box" style="width: 50%"> + <el-autocomplete + class="inline-input" + v-model="val.name" + :fetch-suggestions="querySearch" + placeholder="璇疯緭鍏ュ唴瀹�" + @select="handleSelect" + style="width: 100%" + clearable + @clear="handleClear(val)" + @blur="handleBlur" + ></el-autocomplete> + </div> + <div class="score_box"> + <el-input-number + v-model="val.score" + @blur="handleBlur" + @change="handleBlur" + controls-position="right" + ></el-input-number> + </div> + <div class="icon_box"> + <i + class="el-icon-circle-plus-outline" + style=" + width: 100%; + height: 100%; + font-size: 30px; + color: #409eff; + margin-right: 10px; + " + @click="handlePlus" + v-if="i + 1 == form.remarkAdd.length" + ></i> + <i + class="el-icon-remove-outline" + @click="handleRemove(i)" + style=" + width: 100%; + height: 100%; + font-size: 30px; + color: #f56c6c; + " + ></i> + </div> + </div> + </template> + </el-col> + </el-row> + <div class="bl_line"> + <span>鍔犲垎</span> + <span>{{ form.addTotalScore }}</span> + </div> + <el-row> + <Field label="鏈嶅姟鏄庢槦鎺ㄨ崘" prop="recommend"> + <el-select + v-model="form.recommend" + :clearable="true" + :placeholder="'璇烽€夋嫨'" + > + <el-option label="鏈嶅姟鏄庢槦" value="鏈嶅姟鏄庢槦"></el-option> + </el-select> + </Field> + </el-row> + <el-row> + <Field label="鏀垮姟鏈嶅姟绠$悊绉戝鏍哥瓑娆�" prop="auditLevel" class="level"> + <el-select + v-model="form.auditLevel" + :clearable="true" + :placeholder="'璇烽€夋嫨'" + > + <el-option + :label="label.label" + :value="label.value" + v-for="(label, value) in options" + :key="value" + ></el-option> + </el-select> + </Field> + </el-row> + <el-row + style=" + display: flex; + align-items: center; + justify-content: space-between; + border-top: 1px solid #eee; + padding: 10px 0 0 0; + " + > + <div style="width: 80%"> + 鏈湀寰楀垎 + <span style="font-size: 16px; color: #ff4242"> + {{ + ( + Number(form.addTotalScore) + + Number(form.otherScore) + + Number(form.goworkScore) + + Number(form.reviewScore) + + Number(form.complainScore) + + Number(form.attendScore) + + Number(form.effectScore) + ).toFixed(2) + }} + </span> + </div> + <form-buttons @submit="submitForm" noCancelBtn /> + </el-row> + </el-form> + </el-drawer> +</template> + +<script> +import form from "@/assets/mixins/formdialog"; +export default { + name: "StaffPerformSummaryEditDetail", + mixins: [form], + components: {}, + created() { + this.getArr(); + }, + + data() { + return { + total: 0, + // 閬僵灞� + loading: true, + // 寮瑰嚭灞傛爣棰� + title: "鏂板浜哄憳", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + direction: "rtl", + toString: ["year", "month"], + // 琛ㄥ崟鏍¢獙 + rules: { + month: [{ required: true, message: "璇烽€夋嫨鏈堜唤", trigger: "blur" }], + year: [{ required: true, message: "璇烽€夋嫨骞翠唤", trigger: "blur" }], + staffName: [ + { required: true, message: "璇疯緭鍏ュ憳宸ュ鍚�", trigger: "blur" }, + ], + }, + form: {}, + salaArr: [], + deptArr: [], + rulesList: [], + options: [ + { + label: "濂�", + value: "濂�", + }, + { + label: "杈冨ソ", + value: "杈冨ソ", + }, + { + label: "涓€鑸�", + value: "涓€鑸�", + }, + { + label: "涓嶅悎鏍�", + value: "涓嶅悎鏍�", + }, + { + label: "涓嶇‘瀹�", + value: "涓嶇‘瀹�", + }, + ], + }; + }, + + methods: { + handleBlur() { + this.form.addTotalScore = 0; + + this.form.remarkAdd && this.form.remarkAdd.length > 0 + ? this.form.remarkAdd.forEach((v) => { + if (v.name && v.name != "") { + v.score ? v.score : (v.score = 0); + this.form.addTotalScore += v.score; + } + }) + : ""; + this.form.addTotalScore = this.form.addTotalScore.toFixed(2); + this.$forceUpdate(); + }, + handlePlus() { + this.form.remarkAdd.push({ + name: "", + score: 0, + }); + }, + handleRemove(i) { + if (i == 0 && this.form.remarkAdd.length == 1) { + this.form.remarkAdd = [ + { + name: "", + score: 0, + }, + ]; + } else { + this.form.remarkAdd = this.form.remarkAdd.filter( + (v, index) => index != i + ); + } + this.handleBlur(); + }, + handleClear(val) { + val.name = ""; + val.score = 0; + }, + handleSelect(item) { + this.form.remarkAdd.forEach((val) => { + this.rulesList.forEach((v) => { + if (val.name == v.value) { + v.subAddType == 2 + ? (val.score = Number("-" + v.score)) + : (val.score = Number("+" + v.score)); + } + }); + }); + this.handleBlur(); + }, + querySearch(queryString, cb) { + let rulesList = this.rulesList; + let results = queryString + ? rulesList.filter(this.createFilter(queryString)) + : rulesList; + // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹� + cb(results); + }, + createFilter(queryString) { + return (rule) => { + return ( + rule.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0 + ); + }; + }, + deptChange() { + this.page = 1; + let arr = this.deptArr.filter((v) => v.id == this.form.deptId); + if (arr && arr.length > 0) { + this.form.deptName = arr[0].deptName; + } + }, + salaChange() { + this.$get("/dept/getDeptBySalaId", { salaId: this.form.salaId }) + .then((res) => { + if (res.code == 1) { + this.deptArr = res.data.data; + this.page = 1; + let arr = this.salaArr.filter((v) => v.id == this.form.salaId); + if (arr && arr.length > 0) { + this.form.salaName = arr[0].deptName; + } + } + }) + .catch((error) => { + this.$message.error(error.message); + }); + }, + getArr() { + this.$get("/dept/getSalaList") + .then((res) => { + if (res.code == 1) { + this.salaArr = res.data.data; + } + }) + .catch((error) => { + this.$message.error(error.message); + }); + this.$get("/dept/getDeptBySalaId") + .then((res) => { + if (res.code == 1) { + this.deptArr = res.data.data; + } + }) + .catch((error) => { + this.$message.error(error.message); + }); + }, + /** 缂栬緫 */ + edit(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "/staff/perform/summary/edit/edit"; + this.getData(); + this.pageInfo.type = "edit"; + this.title = "淇敼鍛樺伐鍒嗘暟缁熻"; + }, + /** 鏂板 */ + async add(row) { + this.reset(); + this.urls.currUrl = "/staff/perform/summary/edit/add"; + this.pageInfo.type = "add"; + this.title = "鏂板鍛樺伐鍒嗘暟缁熻"; + await this.$post("/perform/rules/list", { size: -1 }).then( + async (res) => { + if (res.code == 1) { + this.rulesList = res.data.data; + this.rulesList && this.rulesList.length > 0 + ? this.rulesList.forEach((v) => { + v.value = v.name + "--" + v.content; + }) + : ""; + if ( + this.form.remarkAdd === "[]" || + this.form.remarkAdd == undefined || + this.form.remarkAdd == null || + this.form.remarkAdd.length == 0 || + this.form.remarkAdd == "" + ) { + this.form.remarkAdd = [ + { + name: "", + score: 0, + }, + ]; + + this.handleBlur(); + this.$forceUpdate(); + } else { + this.handleBlur(); + this.$forceUpdate(); + } + this.open = true; + } + } + ); + }, + /** 鏌ョ湅*/ + view(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "/staff/perform/summary/edit/view"; + this.getData(); + this.pageInfo.type = "view"; + this.title = "鍛樺伐鍒嗘暟缁熻璇︾粏"; + }, + /**鍙栨秷鎸夐挳 */ + cancel() { + this.open = false; + }, + /**鑾峰彇鏁版嵁鍚庡脊妗� */ + afterRender(data) { + this.open = true; + }, + + afterSubmit(data) { + this.open = false; + this.$emit("ok"); + this.reset(); + }, + + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + staffName: "", + year: "", + month: "", + salaId: "", + selectDeptId: 0, + effectScore: 0, + attendScore: 0, + complainScore: 0, + reviewScore: 0, + goworkScore: 0, + otherScore: 0, + remark: null, + remarkAddDesc: null, + auditLevel: null, + recommend: null, + remark: "", + remarkAdd: [], + addTotalScore: 0, + workNum: "", + }; + this.resetForm("form"); + }, + resetForm(refName) { + if (this.$refs[refName]) { + this.$refs[refName].resetFields(); + } + }, + }, +}; +</script> +<style lang="less" scoped> +.due_month .el-date-picker__header { + display: none; +} +.bl_line { + margin: 0 auto; + background: inherit; + background-color: rgba(0, 102, 255, 0.0470588235294118); + box-sizing: border-box; + border-width: 3px; + border-style: solid; + border-color: rgba(36, 104, 242, 1); + border-top: 0px; + border-right: 0px; + border-bottom: 0px; + border-radius: 4px; + height: 52px; + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 10px; + margin: 5px 0 20px 20px; +} +.attend_box { + display: flex; + align-items: center; + margin-bottom: 20px; + .score_box { + margin: 0 15px; + } + .icon_box { + display: flex; + } + + /deep/.el-input__inner { + width: 100%; + } +} +/deep/.el-autocomplete { + width: 100% !important; +} +</style> \ No newline at end of file diff --git a/src/views/staff/perform/summary/edit/list.vue b/src/views/staff/perform/summary/edit/list.vue new file mode 100644 index 0000000000000000000000000000000000000000..697f2c31c07da48d65ca8f3f8e687b0f8dfb0ef6 --- /dev/null +++ b/src/views/staff/perform/summary/edit/list.vue @@ -0,0 +1,705 @@ +<template> + <div class="page"> + <LayoutTable :data="tableData" notDel :config="tableConfig"> + <el-button + slot="table-head-left2" + style="margin-left: 10px" + icon="el-icon-tickets" + size="mini" + @click="doExport" + :disabled="isExport" + >瀵煎嚭</el-button + > + + <el-button + type="primary" + size="mini" + slot="table-head-left2" + v-if="showBtn" + style="margin-left: 10px" + @click="handleRefresh" + :loading="btnFreshLoading" + >鎵嬪姩鏇存柊</el-button + > + <span class="freshTime" slot="table-head-left2"> + <i class="el-icon-refresh"></i> + <span + >涓婃缁╂晥姹囨€绘椂闂达細{{ + tableData.dict.summaryTime ? tableData.dict.summaryTime : "--" + }}</span + > + </span> + </LayoutTable> + + <dialog-show ref="dialogform" @ok="getData" /> + <drawer-show ref="drawerform" @ok="getData" /> + <div class="mask" v-if="progress"> + <el-progress :stroke-width="26" :percentage="percent"></el-progress> + </div> + <el-dialog + title="绯荤粺鎻愮ず" + :visible.sync="dialogOpen" + width="500px" + append-to-body + @close="cancleFresh" + :close-on-press-escape="false" + :close-on-click-modal="false" + :show-close="false" + > + <div class="fresh_box" v-if="showContent"> + <div class="title_box" style="margin-bottom: 20px"> + 浠呮敮鎸佹墜鍔ㄦ洿鏂版湀搴︾哗鏁堟暟鎹紝璇烽€夋嫨闇€瑕佹洿鏂扮殑鏈堜唤锛� + </div> + <el-date-picker + v-model="freshDate" + type="month" + format="yyyy 骞� MM 鏈�" + value-format="yyyy-MM" + placeholder="璇烽€夋嫨鏈�" + > + </el-date-picker> + </div> + <div class="fresh_box" v-else> + <div + class="title_box" + style="margin-bottom: 20px; line-height: 30px" + v-if="showTip" + > + 璇风‘璁ゆ槸鍚﹀紑濮嬭繘琛寋{ freshDate }}鐨勭哗鏁堟暟鎹噸鏂版眹鎬伙紱姝よ繃绋嬮璁¢渶瑕� + <span style="color: #ff0000">15</span> 鍒嗛挓锛岃鍕垮叧闂垨鍒锋柊椤甸潰 + </div> + <div + class="title_box" + style="margin-bottom: 20px; line-height: 30px" + v-else + > + 姝e湪杩涜{{ freshDate }}鐨勭哗鏁堟暟鎹噸鏂版眹鎬伙紱姝よ繃绋嬮璁¤繕闇€瑕� + <span style="color: #ff0000">{{ restTime }}</span> + 鍒嗛挓锛岃鍕垮叧闂垨鍒锋柊椤甸潰 + </div> + </div> + <div slot="footer" class="dialog-footer" v-if="showTip"> + <el-button + type="primary" + @click="() => (showContent = false)" + v-if="showContent" + >纭� 瀹�</el-button + > + <el-button + type="primary" + @click="submitFresh" + v-else + :loading="submitLoad" + >纭� 瀹�</el-button + > + <el-button @click="cancleFresh">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +/** 琛ㄥ崟寮瑰嚭妗嗘ā寮忛渶寮曞叆 */ +import dialogShow from "./dialogshow"; +import drawerShow from "./drawershow"; +import table from "@/assets/mixins/table"; +export default { + name: "StaffPerformSummaryEditList", + components: { + dialogShow, + drawerShow, + }, + mixins: [table], + created() {}, + + methods: { + countDown() { + if (this.percent == 95) { + if (this.selection.length > 0) { + this.query["idList"] = this.selection; + } + this.$download( + "/staff/perform/summary/edit/exportExcel", + + { + ...this.query, + page: 1, + size: -1, + }, + { type: "excel", name: "缁╂晥姹囨€�" } + ) + .then(() => { + this.percent = 100; + this.progress = false; + this.isExport = false; + }) + .catch((error) => { + this.isExport = false; + this.progress = false; + this.$message.error(error.message); + }); + return; + } else { + this.percent = this.percent + 1; + let that = this; + setTimeout(function () { + that.countDown(); + }, 200); + } + }, + /** 瀵煎嚭Excel */ + doExport() { + this.isExport = true; + this.progress = true; + this.percent = 0; + this.countDown(); + }, + /** 閲嶅啓鏂板鏂规硶 */ + toAdd(row) { + this.$refs.drawerform.add(row); + }, + /** 閲嶅啓缂栬緫鏂规硶 */ + toEdit(row) { + this.$refs.dialogform.edit(row); + }, + /** 閲嶅啓鏌ョ湅鏂规硶 */ + toView(row) { + this.$refs.dialogform.view(row); + }, + afterRender(data) { + data.dict.sortKind = { + 2: "姝e簭", + 1: "鍊掑簭", + }; + this.config.columns.forEach((v) => { + v.label == "鏈嶅姟瑙勮寖" + ? (v.label = ( + <p> + <span>鏈嶅姟瑙勮寖</span> + <p> + {"锛堣€冨嫟缁╂晥/" + data.dict.weightPdu.attendWeight + "鍒嗭級"} + </p> + </p> + )) + : v.label == "缇や紬璇勮" + ? (v.label = ( + <p> + <span>缇や紬璇勮</span> + <p> + {"锛堣瘎浠风哗鏁�/" + data.dict.weightPdu.reviewWeight + "鍒嗭級"} + </p> + </p> + )) + : v.label == "宸ヤ綔鏁堣兘" + ? (v.label = ( + <p> + <span>宸ヤ綔鏁堣兘</span> + <p> + {"锛堝姙浠剁哗鏁�/" + data.dict.weightPdu.goworkWeight + "鍒嗭級"} + </p> + </p> + )) + : v.label == "宸ヤ綔绾緥" + ? (v.label = ( + <p> + <span>宸ヤ綔绾緥</span> + <p> + {"锛堟晥鑳界哗鏁�/" + data.dict.weightPdu.effectWeight + "鍒嗭級"} + </p> + </p> + )) + : v.label == "缁煎悎绠$悊" + ? (v.label = ( + <p> + <span>缁煎悎绠$悊</span> + <p>{"锛堣嚜璇勭哗鏁� *" + data.dict.weightPdu.selfWeight + "%锛�"}</p> + </p> + )) + : v.label == "鍏朵粬缁╂晥" + ? (v.label = ( + <p> + <span>鍏朵粬缁╂晥</span> + <p>{"锛堝叾浠栫哗鏁堬級"}</p> + </p> + )) + : ""; + // if(||v.label='璇勪环缁╂晥鍒嗘暟'||v.label='鍔炰欢缁╂晥鍒嗘暟'||v.label='鏁堣兘缁╂晥鍒嗘暟'||v.label='鑷瘎缁╂晥鍒嗘暟'){ + + // } + }); + }, + handleRefresh() { + this.dialogOpen = true; + this.btnFreshLoading = true; + }, + submitFresh() { + if (this.freshDate) { + this.submitLoad = true; + this.$post("/staff/perform/summary/summary", { + checkTimeStart: this.freshDate + "-01", + checkTimeEnd: this.freshDate + "-31", + }) + .then((res) => { + if (res.code == 1) { + // this.$message.success(res.msg); + this.showTip = false; + this.btnFreshLoading = false; + this.submitLoad = false; + this.endTime = Date.parse(new Date()) + 15 * 60 * 1000; + this.countdown(); + } + }) + .catch((error) => { + this.$message.error(res.msg); + this.submitLoad = false; + this.dialogOpen = false; + this.btnFreshLoading = false; + this.showContent = true; + this.showTip = true; + this.freshDate = ""; + }); + } else { + this.$message.error("璇烽€夋嫨闇€瑕佹洿鏂扮殑鏈堜唤锛�"); + } + }, + cancleFresh() { + this.dialogOpen = false; + this.btnFreshLoading = false; + this.showContent = true; + this.showTip = true; + this.freshDate = ""; + }, + //鍊掕鏃� + countdown() { + let now = Date.parse(new Date()); + let msec = this.endTime - now; + + if (msec < 0) return; + + // let day = parseInt(msec / 1000 / 60 / 60 / 24); + let hr = parseInt((msec / 1000 / 60 / 60) % 24); + let min = parseInt((msec / 1000 / 60) % 60); + let sec = parseInt((msec / 1000) % 60); + min = min > 9 ? min : "0" + min; + sec = sec > 9 ? sec : "0" + sec; + this.restTime = min + "鍒�" + sec + "绉�"; + const that = this; + if (min >= 0 && sec >= 0) { + if (min == 0 && sec == 0) { + this.submitLoad = false; + this.dialogOpen = false; + this.btnFreshLoading = false; + this.showContent = true; + this.showTip = true; + this.freshDate = ""; + this.getData(); + return; + } + setTimeout(function () { + that.countdown(); + }, 1000); + } + }, + handleCellClick(row, column, event, cell) { + if (column.label == "澶囨敞1" || column.label == "澶囨敞2") { + row.label = column.label; + this.toEdit(row); + } + }, + // 琛ㄦ牸鍐呬笅鎷夐€夋寰楄Е鍙戜簨浠� + handleChange(v, row) { + this.$post("/staff/perform/summary/edit/save", row).then((res) => { + const { code, msg } = res; + code == 1 ? this.$message.success(msg) : this.$message.error(msg); + }); + }, + handleBlur(row) { + row.dataType = 2; + this.$post("/staff/perform/summary/edit/save", row).then((res) => { + const { code, msg } = res; + console.log(res); + + code == 1 ? this.$message.success(msg) : this.$message.error(msg); + }); + }, + }, + data() { + return { + endTime: "", + restTime: "15", + freshDate: "", + btnFreshLoading: false, + sortList: "", + dialogOpen: false, + isExport: false, + showBtn: true, + showTip: true, + showContent: true, + submitLoad: false, + progress: false, + percent: 0, + config: { + isshowTabPane: true, + search: [ + { + name: "yearmonth", + type: "month", + label: "璇烽€夋嫨鏈堜唤", + fuzzy: false, + }, + { + name: "sortKind", + type: "select", + label: "鎬诲垎鎺掑簭鏂瑰紡", + fuzzy: false, + }, + { + name: "salaId", + type: "selectSalaId", + label: "澶у巺", + fuzzy: false, + }, + + { + name: "deptId", + type: "selectDeptId", + label: "閮ㄩ棬", + fuzzy: false, + }, + + { + name: "staffName", + type: "text", + label: "鍛樺伐濮撳悕", + fuzzy: true, + }, + ], + columns: [ + { type: "selection", width: 60, fixed: "left" }, + { type: "index", label: "搴忓彿", width: 50, fixed: "left" }, + + { + label: "濮撳悕", + prop: "staffName", + formatter: this.formatter, + fixed: "left", + }, + + { + label: "宸ュ彿", + prop: "workNum", + formatter: this.formatter, + width: 80, + fixed: "left", + }, + { + label: "骞�", + prop: "year", + formatter: this.formatter, + fixed: "left", + }, + { + label: "鏈�", + prop: "month", + formatter: this.formatter, + fixed: "left", + }, + { + label: "鎵嬫満鍙�", + prop: "phoneNumber", + formatter: this.formatter, + }, + + { + label: "鎵€灞炲ぇ鍘�", + prop: "salaName", + formatter: this.formatter, + }, + + { + label: "鎵€灞為儴闂�", + prop: "deptName", + formatter: this.formatter, + }, + { + label: "鎵€灞炰腑蹇�", + formatter: (row) => { + return "瀹滃甯傛皯涓績"; + }, + }, + { + label: "宸ヤ綔绾緥", + prop: "effectScore", + width: 150, + formatter: (row) => { + return ( + <el-input + v-model={row.effectScore} + onBlur={() => { + this.handleBlur(row); + }} + ></el-input> + ); + }, + }, + { + label: "鏈嶅姟瑙勮寖", + prop: "attendScore", + width: 150, + formatter: (row) => { + return ( + <el-input + v-model={row.attendScore} + onBlur={() => { + this.handleBlur(row); + }} + ></el-input> + ); + }, + }, + { + label: `缁煎悎绠$悊`, + prop: "complainScore", + width: 150, + formatter: (row) => { + return ( + <el-input + v-model={row.complainScore} + onBlur={() => { + this.handleBlur(row); + }} + ></el-input> + ); + }, + }, + { + label: "缇や紬璇勮", + prop: "reviewScore", + width: 150, + formatter: (row) => { + return ( + <el-input + v-model={row.reviewScore} + onBlur={() => { + this.handleBlur(row); + }} + ></el-input> + ); + }, + }, + + { + label: "宸ヤ綔鏁堣兘", + prop: "goworkScore", + width: 150, + formatter: (row) => { + return ( + <el-input + v-model={row.goworkScore} + onBlur={() => { + this.handleBlur(row); + }} + ></el-input> + ); + }, + }, + + { + label: `鍏朵粬缁╂晥`, + prop: "otherScore", + width: 150, + formatter: (row) => { + return ( + <el-input + v-model={row.otherScore} + onBlur={() => { + this.handleBlur(row); + }} + ></el-input> + ); + }, + }, + + // { + // label: "绱寮傚父鍒嗘暟", + // prop: "errorScore", + // }, + + { + label: "缁╂晥鍒嗘暟", + prop: "totalScore", + sortable: true, + width: 120, + }, + + { + label: "澶囨敞1", + prop: "remark", + formatter: (row) => { + return row.remark && row.remark != "" ? ( + row.remark + ) : ( + <span style="color:#409eff">娣诲姞澶囨敞1</span> + ); + }, + width: 240, + }, + { + label: "澶囨敞2", + prop: "remarkAddDesc", + formatter: (row) => { + return row.remarkAddDesc && + row.remarkAddDesc != "" && + row.remarkAddDesc != "(0);" ? ( + row.remarkAddDesc + ) : ( + <span style="color:#409eff">娣诲姞澶囨敞2</span> + ); + }, + width: 240, + }, + { + label: "鏀垮姟鏈嶅姟绠$悊绉戝鏍哥瓑娆�", + prop: "auditLevel", + width: 120, + formatter: (row) => { + const options = [ + { + label: "濂�", + value: "濂�", + }, + { + label: "杈冨ソ", + value: "杈冨ソ", + }, + { + label: "涓€鑸�", + value: "涓€鑸�", + }, + { + label: "涓嶅悎鏍�", + value: "涓嶅悎鏍�", + }, + { + label: "涓嶇‘瀹�", + value: "涓嶇‘瀹�", + }, + ]; + return ( + <el-select + v-model={row.auditLevel} + placeholder="璇烽€夋嫨" + clearable + onChange={(v) => this.handleChange(v, row)} + > + {options.map((item) => ( + <el-option + key={item.value} + value={item.value} + label={item.label} + /> + ))} + </el-select> + ); + }, + }, + { + label: "鏈嶅姟鏄庢槦鎺ㄨ崘", + prop: "recommend", + width: 120, + formatter: (row) => { + const options = [ + { + label: "鏈嶅姟鏄庢槦", + value: "鏈嶅姟鏄庢槦", + }, + ]; + return ( + <el-select + v-model={row.recommend} + clearable + placeholder="璇烽€夋嫨" + onChange={(v) => this.handleChange(v, row)} + > + {options.map((item) => ( + <el-option + key={item.value} + value={item.value} + label={item.label} + /> + ))} + </el-select> + ); + }, + }, + { + label: "鍔犲垎", + prop: "addTotalScore", + width: 120, + formatter: (row) => { + return row.addTotalScore || row.addTotalScore == 0 + ? row.addTotalScore > 0 + ? "+" + row.addTotalScore + : row.addTotalScore + : 0; + }, + }, + { + label: "鏈湀寰楀垎", + prop: "sumScore", + sortable: true, + width: 120, + fixed: "right", + }, + { + label: "鎿嶄綔", + width: 120, + fixed: "right", + formatter: (row) => { + return ( + <table-buttons + noAdd + noDel + noEdit + row={row} + onEdit={this.toEdit} + onView={this.toView} + onDel={this.toDel} + /> + ); + }, + }, + ], + }, + }; + }, +}; +</script> +<style lang="less" scoped> +.mask { + width: 100%; + height: 100vh; + position: fixed; + top: 0; + left: 0; + z-index: 99; + padding: 0 30%; + padding-top: 20%; + background: rgba(0, 0, 0, 0.6); +} +::v-deep .el-progress__text { + color: #409eff; + font-weight: 600; +} +::v-deep.el-dialog__wrapper { + overflow: hidden; + top: -50px; +} +.freshTime { + color: #999; + font-size: 14px; +} +/deep/.el-table .red { + background: rgba(255, 233, 233); +} +</style> diff --git a/src/views/staff/perform/summary/edit/view.vue b/src/views/staff/perform/summary/edit/view.vue new file mode 100644 index 0000000000000000000000000000000000000000..40d182b539d0b70263ab619cce322214634acf0d --- /dev/null +++ b/src/views/staff/perform/summary/edit/view.vue @@ -0,0 +1,158 @@ +<template> + <layout-view> + <el-descriptions + :title="title" + :column="column" + :size="size" + :colon="false" + border + > + <template slot="title"> + <i class="el-icon-tickets"></i> + 鍩烘湰璇︾粏淇℃伅 + </template> + <template slot="extra"> + <el-button type="primary" @click="$router.go(-1)" size="small" + >杩斿洖</el-button + > + </template> + <el-descriptions-item + label="浜哄憳id" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.staffId }} + </el-descriptions-item> + <el-descriptions-item + label="宸ュ彿" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.workNum }} + </el-descriptions-item> + <el-descriptions-item + label="浜哄憳鍚嶇О" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.staffName }} + </el-descriptions-item> + <el-descriptions-item + label="閮ㄩ棬id鍙�" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.deptId }} + </el-descriptions-item> + <el-descriptions-item + label="閮ㄩ棬鍚嶇О" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.deptName }} + </el-descriptions-item> + <el-descriptions-item + label="鑰冨嫟缁╂晥鎸囨爣鍒嗘暟" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.attendScore }} + </el-descriptions-item> + <el-descriptions-item + label="璇勪环缁╂晥鎸囨爣鍒嗘暟" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.assessScore }} + </el-descriptions-item> + <el-descriptions-item + label="鍔炰欢缁╂晥鍒嗘暟" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.workScore }} + </el-descriptions-item> + <el-descriptions-item + label="鏁堣兘缁╂晥鍒嗘暟" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.effectScore }} + </el-descriptions-item> + <el-descriptions-item + label="鑷瘎缁╂晥鍒嗘暟" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.otherScore }} + </el-descriptions-item> + <el-descriptions-item + label="绱寮傚父鍒嗘暟" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.errorScore }} + </el-descriptions-item> + <el-descriptions-item + label="褰撴湀寰楀垎鏁�" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.totalScore }} + </el-descriptions-item> + <el-descriptions-item + label="澶囨敞" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.remark }} + </el-descriptions-item> + <el-descriptions-item + label="骞�" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.year }} + </el-descriptions-item> + <el-descriptions-item + label="鏈�" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.month }} + </el-descriptions-item> + </el-descriptions> + </layout-view> +</template> + +<script> +import view from "@/assets/mixins/view"; +export default { + mixins: [view], + components: {}, + methods: {}, + data() { + return { + size: "small", + column: 2, + toString: ["month"], + toArrays: [], + toDate: [], + }; + }, +}; +</script> +<style lang="less"> +.labelClass { + width: 200px; +} +.el-descriptions__body { + margin-left: 5px; + margin-right: 5px; + color: #606266; + background-color: #fff; +} +.contentClass { + width: 600px; +} +</style>