copy from src/views/system/check-template/index.vue
copy to src/views/system/template/default/index.vue
File was copied from src/views/system/check-template/index.vue |
| | |
| | | <div v-else-if="scope.row.unitId === 3">富顺县,荣县,高新区,自流井区,贡井区,大安区,沿滩区</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="调整系数" align="center" prop="adjustCoefficient" /> |
| | | <el-table-column label="调整系数计算方式" align="center" prop="adjustWay"/> |
| | | <el-table-column label="状态" align="center" prop="status" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | |
| | | <el-form-item label="模板名称" prop="templateName"> |
| | | <el-input v-model="form.templateName" placeholder="请输入模板名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="考核类型" prop="examineCategory"> |
| | | <el-select v-model="form.examineCategory" placeholder="请选择考核类型"> |
| | | <el-option label="省厅考核" value="省厅考核"/> |
| | | <el-option label="区县考核" value="区县考核"/> |
| | | <el-option label="运维考核" value="公司考核"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="考核对象" prop="unitName"> |
| | | <div class="block"> |
| | | <span class="demonstration"></span> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="row-right"> |
| | | <div>权重</div> |
| | | <div>数值</div> |
| | | <div class="margin-5"> |
| | | <el-input type="number" v-model="form.weight"/> |
| | | </div> |
| | |
| | | <el-button type="success" @click="nextAdd" size="mini" plain>添加</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="调整系数" prop="adjustCoefficient"> |
| | | <el-input v-model="form.adjustCoefficient" placeholder="请输入系数值" /> |
| | | </el-form-item> |
| | | <el-form-item label="调整方式" prop="adjustWay"> |
| | | <el-select v-model="form.adjustWay" placeholder="请选择调整系数计算方式"> |
| | | <el-option |
| | | label="乘" |
| | | value="*"> |
| | | </el-option> |
| | | <el-option |
| | | label="除" |
| | | value="/"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio v-model="form.status" label="use">启用</el-radio> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listCheckTemplate, getCheckTemplate, delCheckTemplate, addCheckTemplate, updateCheckTemplate } from "@/api/platform/check-template"; |
| | | import { ruleSelect } from '../../../api/platform/check-rule' |
| | | import { unitSelect } from '../../../api/platform/unit' |
| | | import { listTemplate, getTemplate, delTemplate, addTemplate, updateTemplate } from "@/api/platform/default-template"; |
| | | // import { ruleSelect } from '@/api/platform/default-rule' |
| | | import { unitSelect } from '@/api/platform/unit' |
| | | |
| | | export default { |
| | | name: "CheckTemplate", |
| | |
| | | templateName: [ |
| | | { required: true, message: "模板名称不能为空", trigger: "blur" } |
| | | ], |
| | | adjustCoefficient: [ |
| | | { required: true, message: "调整系数不能为空", trigger: "blur" } |
| | | ], |
| | | adjustWay: [ |
| | | { required: true, message: "调整方式:乘除不能为空", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | |
| | | this.tempRuleFormList.push({"ruleId": null, "weight": null}) |
| | | }, |
| | | // 考核规则下拉数据 |
| | | selectCheckRule() { |
| | | ruleSelect().then(res => { |
| | | this.ruleList = res.data; |
| | | }) |
| | | }, |
| | | // selectCheckRule() { |
| | | // ruleSelect().then(res => { |
| | | // this.ruleList = res.data; |
| | | // }) |
| | | // }, |
| | | // 运维公司下拉数据 |
| | | selectUnit() { |
| | | unitSelect().then(res => { |
| | |
| | | this.queryParams["start"] = this.daterangeCreateTime[0]; |
| | | this.queryParams["end"] = this.daterangeCreateTime[1]; |
| | | } |
| | | listCheckTemplate(this.queryParams).then(response => { |
| | | listTemplate(this.queryParams).then(response => { |
| | | this.checkTemplateList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getCheckTemplate(id).then(response => { |
| | | getTemplate(id).then(response => { |
| | | this.form = response.data; |
| | | this.tempRuleFormList = this.form.ruleFormList; |
| | | this.ruleFormList = this.form.ruleFormList; |
| | |
| | | if (valid) { |
| | | this.form.ruleFormList = this.tempRuleFormList; |
| | | if (this.form.id != null) { |
| | | updateCheckTemplate(this.form).then(response => { |
| | | updateTemplate(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.tempRuleFormList = []; |
| | |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addCheckTemplate(this.form).then(response => { |
| | | addTemplate(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除考核模板编号为"' + ids + '"的数据项?').then(function() { |
| | | return delCheckTemplate(ids); |
| | | return delTemplate(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |