考核评分
This commit is contained in:
		| @@ -162,14 +162,9 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import RenderForm from './RenderForm' | ||||
|   export default { | ||||
|     name: 'Detail', | ||||
|  | ||||
|     components: { | ||||
|       RenderForm | ||||
|     }, | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|   | ||||
| @@ -1,188 +0,0 @@ | ||||
| <template> | ||||
|   <div class="render-form"> | ||||
|     <div class="render-form__item" v-for="(group, name) in data" :key="name"> | ||||
|       <h2 class="render-form__title" v-if="name !== '0'">{{ name }}</h2> | ||||
|       <div | ||||
|         class="left-item__item components-item" | ||||
|         v-for="(item, i) in group" | ||||
|         :key="i"> | ||||
|         <div class="left-item__item--title"> | ||||
|           <i :style="{opacity: item.mustFill === '1' ? 1 : 0}">*</i> | ||||
|           <span>{{ i + 1 }}.</span> | ||||
|           <h2>{{ item.fieldName }}</h2> | ||||
|         </div> | ||||
|         <p class="text" v-if="item.explain">{{ item.explain }}</p> | ||||
|         <div class="left-item__item--wrapper"> | ||||
|           <template v-if="(item.fieldType === 'radio')"> | ||||
|             <el-radio-group v-model="formInfo[`field_${i}`]"> | ||||
|               <el-radio :label="v.dictName" v-for="v in dict.getDict(item.dictionaryCode)" :key="v.dictName">{{ v.dictName }}</el-radio> | ||||
|             </el-radio-group> | ||||
|           </template> | ||||
|           <template v-if="(item.fieldType === 'score')"> | ||||
|             <el-input-number style="width: 300px" size="small" :placeholder="`请输入${item.fieldName}`" v-model="formInfo[`field_${i}`]" :precision="1" :step="0.1" :max="10"></el-input-number> | ||||
|           </template> | ||||
|           <template v-if="item.fieldType === 'upload'"> | ||||
|             <img style="width: 100%; height: 100%;" :src="formInfo[`field_${i}`]" v-if="formInfo[`field_${i}`]"> | ||||
|             <div class="left-item__item--upload" v-else> | ||||
|               <span>图片</span> | ||||
|             </div> | ||||
|           </template> | ||||
|           <template v-if="item.fieldType === 'select'"> | ||||
|             <ai-select | ||||
|               v-model="formInfo[`field_${i}`]" | ||||
|               :placeholder="`请输入${item.fieldName}`" | ||||
|               :selectList="dict.getDict(item.dictionaryCode)"> | ||||
|             </ai-select> | ||||
|           </template> | ||||
|           <template v-if="(item.fieldType === 'checkbox')"> | ||||
|             <el-checkbox-group v-model="formInfo[`field_${i}`]"> | ||||
|               <el-checkbox :label="v.dictName" v-for="v in dict.getDict(item.dictionaryCode)" :key="v.dictName">{{ v.dictName }}</el-checkbox> | ||||
|             </el-checkbox-group> | ||||
|           </template> | ||||
|           <template v-if="(item.fieldType === 'sign')"> | ||||
|             <AiDrawer></AiDrawer> | ||||
|           </template> | ||||
|           <template v-if="(item.fieldType === 'input')"> | ||||
|             <el-input size="small" :placeholder="`请输入${item.fieldName}`" v-model="formInfo[`field_${i}`]"></el-input> | ||||
|           </template> | ||||
|           <template v-if="(item.fieldType === 'textarea')"> | ||||
|             <el-input size="small" type="textarea" :placeholder="`请输入${item.fieldName}`" v-model="formInfo[`field_${i}`]"></el-input> | ||||
|           </template> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     props: ['data', 'dict'], | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         formInfo: {} | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
|   .render-form { | ||||
|     .render-form__title { | ||||
|       font-size: 15px; | ||||
|       font-weight: 600; | ||||
|       color: #333; | ||||
|     } | ||||
|  | ||||
|     .render-form__item { | ||||
|       margin-bottom: 12px; | ||||
|     } | ||||
|  | ||||
|  | ||||
|     .left-item__item--formname { | ||||
|       margin: 16px 0 32px; | ||||
|       padding: 0 12px; | ||||
|       color: #333333; | ||||
|       font-size: 15px; | ||||
|       font-weight: normal; | ||||
|       text-align: center; | ||||
|       word-break: break-all; | ||||
|     } | ||||
|  | ||||
|     .left-item__item--text { | ||||
|       line-height: 20px; | ||||
|       // margin-bottom: 48px; | ||||
|       padding: 0 12px 20px; | ||||
|       text-align: justify; | ||||
|       color: #666; | ||||
|       font-size: 14px; | ||||
|       word-break: break-all; | ||||
|     } | ||||
|  | ||||
|     .left-item__item--title { | ||||
|       display: flex; | ||||
|       margin-bottom: 10px; | ||||
|  | ||||
|       i { | ||||
|         position: relative; | ||||
|         top: 3px; | ||||
|         margin-right: 5px; | ||||
|         color: #E22120; | ||||
|       } | ||||
|  | ||||
|       span { | ||||
|         position: relative; | ||||
|         top: 3px; | ||||
|       } | ||||
|  | ||||
|       h2 { | ||||
|         color: #333333; | ||||
|         font-size: 15px; | ||||
|         font-weight: 600; | ||||
|       } | ||||
|     } | ||||
|     .left-item__item--upload { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       justify-content: center; | ||||
|       flex-direction: column; | ||||
|       width: 120px; | ||||
|       height: 120px; | ||||
|       border-radius: 6px; | ||||
|       border: 1px dashed #bbb; | ||||
|  | ||||
|       i { | ||||
|         font-size: 24px; | ||||
|         color: #8899bb; | ||||
|       } | ||||
|  | ||||
|       span { | ||||
|         margin-top: 4px; | ||||
|         font-size: 12px; | ||||
|         color: #555; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .components-item { | ||||
|       position: relative; | ||||
|       padding: 8px 0px; | ||||
|  | ||||
|       & > p { | ||||
|         margin-bottom: 10px; | ||||
|         padding: 0 12px; | ||||
|         font-size: 14px; | ||||
|         white-space: break-spaces; | ||||
|         color: #666; | ||||
|       } | ||||
|  | ||||
|       .left-item__item--wrapper { | ||||
|         padding: 0 10px; | ||||
|         & > img { | ||||
|           max-width: 300px; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .left-item__item--upload { | ||||
|         display: flex; | ||||
|         align-items: center; | ||||
|         justify-content: center; | ||||
|         flex-direction: column; | ||||
|         width: 120px; | ||||
|         height: 120px; | ||||
|         border-radius: 6px; | ||||
|         border: 1px dashed #bbb; | ||||
|  | ||||
|         i { | ||||
|           font-size: 24px; | ||||
|           color: #8899bb; | ||||
|         } | ||||
|  | ||||
|         span { | ||||
|           margin-top: 4px; | ||||
|           font-size: 12px; | ||||
|           color: #555; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user