| | |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:template:add']" |
| | | v-hasPermi="['platform:score:add']" |
| | | >新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['system:template:edit']" |
| | | v-hasPermi="['platform:score:edit']" |
| | | >修改</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:template:remove']" |
| | | v-hasPermi="['platform:score:remove']" |
| | | >删除</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:template:export']" |
| | | v-hasPermi="['platform:score:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | |
| | | |
| | | <el-table v-loading="loading" :data="auditingList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="运维考核单位" align="center" prop="unitName" width="180"/> |
| | | <el-table-column label="考核名" align="center" prop="checkPublishId" width="180"> |
| | | <el-table-column label="考核单位" align="center" prop="unitName" width="180"/> |
| | | <el-table-column label="考核合同" align="center" prop="contractName" width="180" /> |
| | | <el-table-column label="考核规则" align="center" prop="ruleName" width="120" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="考核指标" align="center" prop="num" width="120" /> |
| | | <el-table-column label="考核扣分" align="center" prop="score" width="120" /> |
| | | <el-table-column label="创建人" align="center" prop="createUser" /> |
| | | <el-table-column label="审核状态" align="center" prop="auditingStatus"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="scope.row.checkPublishId === 5">视频考核</div> |
| | | </template> |
| | | <el-tag |
| | | :type="scope.row.auditingStatus === '通过' ? 'success' : scope.row.auditingStatus === '未通过' ? 'danger' : 'primary'" |
| | | disable-transitions>{{scope.row.auditingStatus}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="运维考核规则" align="center" prop="defaultRuleName" width="180" /> |
| | | <el-table-column label="运维考核扣分" align="center" prop="score" width="120" /> |
| | | <el-table-column label="创建人" align="center" prop="createBy" /> |
| | | <el-table-column label="审核人" align="center" prop="auditingUserName" /> |
| | | <el-table-column label="审核状态" align="center" prop="auditingStatus" /> |
| | | <el-table-column label="审核说明" align="center" prop="remark" width="180"/> |
| | | <el-table-column label="审核时间" align="center" prop="auditingTime" width="180"/> |
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180"/> |
| | | <el-table-column label="审核人" align="center" prop="auditingUser" /> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | icon="el-icon-s-check" |
| | | @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['default:audit']" |
| | | v-if="scope.row.auditingStatus === '待审核'" |
| | | >审核</el-button> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="handleUpdate(scope.row)"--> |
| | | <!-- v-hasPermi="['system:auditing:edit']"--> |
| | | <!-- >修改</el-button>--> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:auditing:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="运维考核规则"> |
| | | <el-input v-model="auditingForm.defaultRuleName" disabled/> |
| | | <el-input v-model="auditingForm.ruleName" type="textarea" autosize disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="运维考核指标"> |
| | | <el-input v-model="auditingForm.num" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="运维考核扣分"> |
| | | <el-input v-model="auditingForm.score" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="审核结果" prop="auditingStatus"> |
| | | <el-radio v-model="auditingForm.auditingResult" label="pass">通过</el-radio> |
| | | <el-radio v-model="auditingForm.auditingResult" label="return">驳回</el-radio> |
| | | <el-radio v-model="auditingForm.auditingStatus" label="通过">通过</el-radio> |
| | | <el-radio v-model="auditingForm.auditingStatus" label="未通过">驳回</el-radio> |
| | | </el-form-item> |
| | | <el-form-item label="审核说明" prop="remark"> |
| | | <el-input v-model="auditingForm.remark" type="textarea" show-word-limit maxlength="100"/> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 新增或修改 --> |
| | | <el-dialog title="运维积分审核" :visible.sync="open" width="700px" append-to-body> |
| | | <el-form ref="auditingForm" :model="auditingForm" :rules="auditingRules" label-width="120px"> |
| | | <el-dialog :title="title" :visible.sync="open" width="700px" 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"> |
| | | <el-option |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="运维考核规则" prop="tempRuleFormList"> |
| | | <el-form-item label="运维考核规则" prop="ruleIdsArray"> |
| | | <div class="row-warp"> |
| | | <div class="row"> |
| | | <div class="row-left"> |
| | |
| | | <span class="demonstration"></span> |
| | | <el-cascader |
| | | ref="cascader" |
| | | v-model="value" |
| | | v-model="form.ruleIdsArray" |
| | | :options="options" |
| | | @change="handleChange"> |
| | | <template slot-scope="{ data }"> |
| | |
| | | <div class="row-right" v-if="needNum"> |
| | | <div>指标</div> |
| | | <div class="margin-5"> |
| | | <el-input type="number" placeholder="请输入" v-model="form.num" @change="handleChangeNum"/> |
| | | <el-input placeholder="请输入" v-model="form.num" @input="handleChangeNum"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="运维考核扣分" style="width: 51%"> |
| | | <el-input type="number" v-model="form.score"></el-input> |
| | | <el-form-item label="运维考核扣分" style="width: 51%" prop="score"> |
| | | <el-input v-model="form.score"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitAuditing">确 定</el-button> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listAuditing, getAuditing, delAuditing, addAuditing, updateAuditing,auditing } from "@/api/platform/contract-score"; |
| | | import { listAuditing, getAuditing, delAuditing, addAuditing, updateAuditing, auditing } from "@/api/platform/contract-score"; |
| | | import { unitSelect } from "@/api/platform/unit"; |
| | | import { getRuleListByUnitId } from "@/api/platform/calculate-rule"; |
| | | import { getRuleListByUnitId, getRule } from "@/api/platform/calculate-rule"; |
| | | |
| | | export default { |
| | | name: "Auditing", |
| | |
| | | {id:1 , value:"车辆考核"}, |
| | | {id:2 , value:"视频考核"} |
| | | ], |
| | | // 临时规则表单 |
| | | tempRuleForm: {}, |
| | | // 临时规则表单列表 |
| | | tempRuleFormList: [{"ruleId": null, "adjustCoefficient": null}], |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | defaultId: null, |
| | | unitId: null, |
| | | auditingStatus: null, |
| | | auditingTime: null, |
| | | auditingUser: null, |
| | |
| | | // 表单校验 |
| | | auditingRules: { |
| | | auditingStatus: [ |
| | | { required: true, message: "请先完成审核结果", trigger: "blur" } |
| | | { required: true, message: "请先完成审核结果", trigger: "blur", }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | if (value === '待审核') { |
| | | callback(new Error("请先完成审核结果")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | | rules: { |
| | | unitId: [ |
| | | { required: true, message: "请选择运维考核单位", trigger: "blur" } |
| | | ], |
| | | ruleIdsArray: [ |
| | | { required: true, message: "请选择运维考核规则", trigger: "blur" } |
| | | ], |
| | | score: [ |
| | | { required: true, message: "分数不能为空", trigger: "blur" } |
| | | ] |
| | | }, |
| | | calcObj: {} |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.getUnitSelect(); |
| | | }, |
| | | methods: { |
| | | /** |
| | | * 选择规则 |
| | | */ |
| | | handleChange() { |
| | | let item = this.$refs['cascader'].getCheckedNodes()[0].data; |
| | | console.log("item", item); |
| | | this.calcObj = item; |
| | | this.form.contractId = item.contractId; |
| | | if (item.deductCategory == "扣指定分数") { |
| | | this.needNum = false; |
| | | this.form.score = item.calcFraction; |
| | |
| | | this.needNum = true; |
| | | this.form.score = null; |
| | | } |
| | | if (this.form.num != null && this.needNum) { |
| | | this.handleChangeNum(); |
| | | } |
| | | }, |
| | | /** |
| | | * 输入指标 |
| | | */ |
| | | handleChangeNum() { |
| | | // 算分 |
| | | if (this.calcObj.deductCategory == "分数乘以数量") { |
| | | this.form.score = Math.floor(this.calcObj.calcFraction * this.form.num * 100) / 100; |
| | | } else if (this.calcObj.deductCategory == "除以数量后乘以分数") { |
| | | this.form.score = Math.floor(Math.ceil(this.form.num / this.calcObj.calcUnit) * this.calcObj.calcFraction * 100) / 100; |
| | | } |
| | | }, |
| | | handleChangeUnit(value) { |
| | | getRuleListByUnitId(value).then((res) => { |
| | |
| | | // 打开审核 |
| | | handleAuditing(row) { |
| | | this.auditingOpen = true; |
| | | this.auditingForm = row; |
| | | this.auditingForm.auditingStatus = this.auditingForm.auditingStatus ? this.auditingForm.auditingStatus : null |
| | | this.auditingForm = {...row}; |
| | | }, |
| | | // 关闭审核 |
| | | closeAuditing() { |
| | |
| | | this.queryParams["createStartTime"] = this.daterangeCreateTime[0]; |
| | | this.queryParams["createEndTime"] = this.daterangeCreateTime[1]; |
| | | } |
| | | console.log("this.queryParams", this.queryParams) |
| | | listAuditing(this.queryParams).then(response => { |
| | | this.auditingList = response.data; |
| | | this.auditingList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | defaultId: null, |
| | | auditingStatus: null, |
| | | remark: null, |
| | | auditingTime: null, |
| | | auditingUser: null, |
| | | createTime: null, |
| | | updateTime: null, |
| | | deleted: null |
| | | auditingUser: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | |
| | | getAuditing(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改运维考核审核"; |
| | | this.title = "修改运维考核积分"; |
| | | this.handleChangeUnit(this.form.unitId); |
| | | getRule(this.form.ruleId).then(res => { |
| | | this.calcObj = res.data; |
| | | if (this.calcObj.deductCategory != "扣指定分数") { |
| | | this.needNum = true; |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.form.ruleId = this.calcObj.id; |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('/default-auditing/export', { |
| | | this.download('/contract/score/export', { |
| | | ...this.queryParams |
| | | }, `auditing_${new Date().getTime()}.xlsx`) |
| | | }, `合同考核积分_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |