| | |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" > |
| | | <el-form-item v-if="state.isAdmin" label="单位:" prop="companyId"> |
| | | <el-select v-model="state.form.companyId" placeholder="请选择" clearable filterable style="width: 100%" :disabled="state.title =='查看'"> |
| | | <el-option |
| | | v-for="item in state.companyList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="条款编码:" prop="clauseNum"> |
| | | <el-input v-model.trim="state.form.clauseNum" :disabled="state.title =='查看'" placeholder="条款编码"></el-input> |
| | | </el-form-item> |
| | |
| | | companyId: null, |
| | | points:'' |
| | | }, |
| | | isAdmin: false, |
| | | companyList: [], |
| | | formRules:{ |
| | | clauseNum: [{ required: true, message: '请输入条款编码', trigger: 'blur' }], |
| | | name: [{ required: true, message: '请输入条款内容', trigger: 'blur' }], |
| | | // points: [{ required: true, message: '请输入审核要点', trigger: 'blur' }], |
| | | companyId: [{ required: true, message: '请选择单位', trigger: 'blur' }], |
| | | } |
| | | }) |
| | | onMounted(() => { |
| | | |
| | | }); |
| | | |
| | | const openDialog = async (type, value,companyId) => { |
| | | const openDialog = async (type, value,companyId,isAdmin, companyList) => { |
| | | state.isAdmin = isAdmin |
| | | if(isAdmin){ |
| | | state.companyList = companyList |
| | | } |
| | | state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' |
| | | state.form.companyId = companyId |
| | | showEditor.value = false |