| | |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | |
| | | <el-row :gutter="10" class="mb8" style="margin-top: 10px"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | </el-link |
| | | > |
| | | <div style="text-align: right; margin-top: 10px"> |
| | | <!-- <el-button type="primary" @click="handleImportRule">导入规则</el-button>--> |
| | | <el-button type="primary" @click="submitForm">提交</el-button> |
| | | </div> |
| | | </el-collapse> |
| | | </el-form> |
| | | </div> |
| | | </el-drawer> |
| | | <!-- 导入规则对话框 --> |
| | | <el-dialog |
| | | :title="importRule.title" |
| | | :visible.sync="importRule.open" |
| | | width="1000px" |
| | | append-to-body |
| | | > |
| | | <el-form ref="form" :model="upload" :rules="rules" label-width="80px"> |
| | | <div class="row-right" style="margin-left: 80px"> |
| | | <div class="margin-5"> |
| | | <el-upload |
| | | ref="upload" |
| | | :limit="1" |
| | | accept=".xlsx, .xls" |
| | | :headers="upload.headers" |
| | | :action="upload.url" |
| | | :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" |
| | | :on-success="handleFileSuccess" |
| | | :data="upload" |
| | | :auto-upload="false" |
| | | drag |
| | | style="text-align: center" |
| | | > |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text"> |
| | | 将文件拖到此处,或<em>点击上传</em> |
| | | </div> |
| | | <div class="el-upload__tip text-center" slot="tip"> |
| | | <span>仅允许导入xls、xlsx格式文件。</span> |
| | | <el-link |
| | | type="primary" |
| | | :underline="false" |
| | | style="font-size: 12px; vertical-align: baseline" |
| | | @click="importTemplate" |
| | | >下载模板 |
| | | </el-link |
| | | > |
| | | </div> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <el-divider content-position="left">考核结果应用规则</el-divider> |
| | | <div class="row-warp"> |
| | | <div |
| | | class="row" |
| | | v-for="(item, index) in upload.ruleList" |
| | | :key="index" |
| | | > |
| | | <div class="row-left" style="flex: 0.7"> |
| | | <div class="block"> |
| | | <el-form-item label="考核条件" prop="ruleList"> |
| | | <el-input |
| | | v-model="item.scoreCondition" |
| | | style="width: 250px" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <div class="row-right"> |
| | | <div class="margin-5"> |
| | | <el-form-item label="规则描述" prop="ruleList"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="item.description" |
| | | style="width: 300px" |
| | | /> |
| | | <el-button |
| | | style="margin-left: 50px" |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | circle |
| | | @click="deleteRule(index)" |
| | | ></el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-button |
| | | style="margin-left: 50px" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | circle |
| | | @click="addRule" |
| | | ></el-button> |
| | | </el-form> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="upload.open = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitFileForm">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 合同导入对话框 --> |
| | | <el-dialog |
| | | :title="upload.title" |
| | |
| | | startTime: "", |
| | | endTime: "", |
| | | }, |
| | | // 规则导入参数 |
| | | importRule: { |
| | | // 是否显示弹出层(合同导入) |
| | | open: false, |
| | | // 弹出层标题(合同导入) |
| | | title: "", |
| | | // 是否禁用上传 |
| | | isUploading: false, |
| | | // 设置上传的请求头部 |
| | | headers: {Authorization: "Bearer " + getToken()}, |
| | | // 上传的地址 |
| | | url: process.env.VUE_APP_BASE_API + "/system/contract/updateRule", |
| | | ruleList: [], |
| | | }, |
| | | dialogImageUrl: "", |
| | | dialogVisible: false, |
| | | disabled: false, |
| | |
| | | this.upload.title = "合同导入"; |
| | | this.upload.open = true; |
| | | }, |
| | | /** 导入按钮操作 */ |
| | | handleImportRule() { |
| | | this.importRule.title = "规则导入"; |
| | | this.importRule.open = true; |
| | | }, |
| | | /** 下载模板操作 */ |
| | | importTemplate() { |
| | | this.download("system/contract/importTemplate", {}, `合同导入模板.xlsx`); |