| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="审核时间"> |
| | | <el-date-picker v-model="daterangeAuditingTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> |
| | | <el-date-picker v-model="daterangeAuditingTime" style="width: 240px" value-format="yyyy-MM-dd" |
| | | type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleQuery"></el-date-picker> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="创建时间"> |
| | | <el-date-picker v-model="daterangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> |
| | | <el-date-picker v-model="daterangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" |
| | | type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleQuery"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 新增或修改 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> |
| | | <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="运维考核单位" prop="unitId"> |
| | | <el-select v-model="form.unitId" placeholder="运维考核单位" @change="handleChangeUnit"> |
| | |
| | | <div class="row-left"> |
| | | <div class="block"> |
| | | <span class="demonstration"></span> |
| | | <el-cascader ref="cascader" v-model="form.ruleIdsArray" :options="options" @change="handleChange"> |
| | | <el-cascader |
| | | ref="cascader" |
| | | v-model="form.ruleIdsArray" |
| | | :options="options" |
| | | @change="handleChange" |
| | | :props="{ expandTrigger: 'hover'}" |
| | | > |
| | | <template slot-scope="{ data }"> |
| | | <el-tooltip class="item" :disabled="data.label.length < 16 && !data.deductCategory" effect="dark" |
| | | :content=" |
| | | data.label.length < 16 ? |
| | | data.deductCategory ? |
| | | data.deductCategory == '分数乘以数量' ? '扣' + data.calcFraction + '分*数量 ' : data.deductCategory == '除以数量后乘以分数' ? '扣' + data.calcFraction + '分/' + data.calcUnit + '小时' : '扣' + data.calcFraction + '分' : |
| | | '' : |
| | | (data.deductCategory ? |
| | | data.label + ' ' + (data.deductCategory == '分数乘以数量' ? '扣' + data.calcFraction + '分*数量 ' : data.deductCategory == '除以数量后乘以分数' ? '扣' + data.calcFraction + '分/' + data.calcUnit + '小时' : '扣' + data.calcFraction + '分') : |
| | | data.label)" |
| | | placement="left"> |
| | | <el-tooltip class="item" :disabled="calculateTooltipDisabled(data)" effect="dark" |
| | | :content="calculateTooltipContent(data)" placement="left"> |
| | | <span>{{ data.label }}</span> |
| | | </el-tooltip> |
| | | </template> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="row-right" v-if="needNum"> |
| | | <div>指标</div> |
| | | <div>次数/数量/小时</div> |
| | | <div class="margin-5"> |
| | | <el-input placeholder="请输入" v-model="form.num" @input="handleChangeNum" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | {{ ruleDescription}} |
| | | </div> |
| | | |
| | | </el-form-item> |
| | | <el-form-item label="运维考核扣分" style="width: 51%" prop="score"> |
| | | <el-form-item label="运维考核扣分" style="width: 30%" prop="score"> |
| | | <el-input v-model="form.score"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | auditingOpen: false, |
| | | auditingForm: {}, |
| | | unitList: [], |
| | | ruleDescription: '', // 添加规则描述字段 |
| | | // 考核模板 |
| | | examineList: [ |
| | | { id: 1, value: "车辆考核" }, |
| | |
| | | this.form.contractId = item.contractId; |
| | | this.form.ruleName = item.ruleName + " / " + item.label; |
| | | this.form.deductCategory = item.deductCategory == '分数乘以数量' ? '扣' + item.calcFraction + '分*数量 ' : item.deductCategory == '除以数量后乘以分数' ? '扣' + item.calcFraction + '分/' + item.calcUnit + '小时' : '扣' + item.calcFraction + '分'; |
| | | this.ruleDescription = this.calculateTooltipContent(item); |
| | | if (item.deductCategory == "扣指定分数") { |
| | | this.needNum = false; |
| | | this.form.score = item.calcFraction; |
| | |
| | | this.download('/contract/score/export', { |
| | | ...this.queryParams |
| | | }, `合同考核积分_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | calculateTooltipDisabled(data) { |
| | | return data.label.length < 16 && !data.deductCategory; |
| | | }, |
| | | calculateTooltipContent(data) { |
| | | let content = ''; |
| | | if (data.label.length < 16) { |
| | | if (data.deductCategory) { |
| | | switch (data.deductCategory) { |
| | | case '分数乘以数量': |
| | | content = '扣' + data.calcFraction + '分*数量 '; |
| | | break; |
| | | case '除以数量后乘以分数': |
| | | content = '扣' + data.calcFraction + '分/' + data.calcUnit + '小时'; |
| | | break; |
| | | default: |
| | | content = '扣' + data.calcFraction + '分'; |
| | | } |
| | | } |
| | | } else { |
| | | if (data.deductCategory) { |
| | | switch (data.deductCategory) { |
| | | case '分数乘以数量': |
| | | content = data.label + ' 扣' + data.calcFraction + '分*数量 '; |
| | | break; |
| | | case '除以数量后乘以分数': |
| | | content = data.label + ' 扣' + data.calcFraction + '分/' + data.calcUnit + '小时'; |
| | | break; |
| | | default: |
| | | content = data.label + ' 扣' + data.calcFraction + '分'; |
| | | } |
| | | } else { |
| | | content = data.label; |
| | | } |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |