考核评分
This commit is contained in:
		
							
								
								
									
										69
									
								
								project/hlj/app/AppFormTemplate/AppFormTemplate.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								project/hlj/app/AppFormTemplate/AppFormTemplate.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | ||||
| <template> | ||||
|   <div class="doc-circulation"> | ||||
|     <keep-alive :include="['List']"> | ||||
|       <component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component> | ||||
|     </keep-alive> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   import Add from './components/Add' | ||||
|   import List from './components/List' | ||||
|  | ||||
|   export default { | ||||
|     name: 'AppScoringTemplate', | ||||
|     label: '评分模板', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         component: 'List', | ||||
|         params: {}, | ||||
|         include: [] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     components: { | ||||
|       List, | ||||
|       Add | ||||
|     }, | ||||
|  | ||||
|     mounted () { | ||||
|       if (this.$route.query.isAdd === '1') { | ||||
|         this.component = 'Add' | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       onChange (data) { | ||||
|         if (data.type === 'Add') { | ||||
|           this.component = 'Add' | ||||
|           this.params = data.params | ||||
|         } | ||||
|  | ||||
|         if (data.type === 'List') { | ||||
|           this.component = 'List' | ||||
|           this.params = data.params | ||||
|  | ||||
|           this.$nextTick(() => { | ||||
|             if (data.isRefresh) { | ||||
|               this.$refs.component.getList() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss"> | ||||
|   .doc-circulation { | ||||
|     height: 100%; | ||||
|     background: #F3F6F9; | ||||
|     overflow: auto; | ||||
|   } | ||||
| </style> | ||||
							
								
								
									
										1371
									
								
								project/hlj/app/AppFormTemplate/components/Add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1371
									
								
								project/hlj/app/AppFormTemplate/components/Add.vue
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										158
									
								
								project/hlj/app/AppFormTemplate/components/List.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										158
									
								
								project/hlj/app/AppFormTemplate/components/List.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,158 @@ | ||||
| <template> | ||||
|   <ai-list class="list"> | ||||
|     <ai-title slot="title" title="评分模板" isShowBottomBorder :instance="instance"></ai-title> | ||||
|     <template slot="content"> | ||||
|       <div class="content"> | ||||
|         <ai-search-bar bottomBorder> | ||||
|           <template #left> | ||||
|             <!-- <el-button type="primary" @click="toAdd('')">新建模板</el-button> --> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <el-input | ||||
|               v-model="search.title" | ||||
|               size="small" | ||||
|               placeholder="请输入模板名称" | ||||
|               clearable | ||||
|               v-throttle="() => {search.current = 1, getList()}" | ||||
|               @clear="search.current = 1, search.title = '', getList()" | ||||
|               suffix-icon="iconfont iconSearch"> | ||||
|             </el-input> | ||||
|           </template> | ||||
|         </ai-search-bar> | ||||
|         <ai-table | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="total" | ||||
|           v-loading="loading" | ||||
|           style="margin-top: 16px;" | ||||
|           :current.sync="search.current" | ||||
|           :size.sync="search.size" | ||||
|           @getList="getList"> | ||||
|           <el-table-column slot="options" width="140px" fixed="right" label="操作" align="center"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <div class="table-options"> | ||||
|                 <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||
|                 <el-button type="text" @click="changeStatus(row.id, row.status)">{{ row.status === '0' ? '启用' : '停用' }}</el-button> | ||||
|                 <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||
|               </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </div> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     name: 'List', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         search: { | ||||
|           current: 1, | ||||
|           size: 10, | ||||
|           title: '' | ||||
|         }, | ||||
|         colConfigs: [ | ||||
|           { prop: 'title', label: '模板名称' }, | ||||
|           { prop: 'createUserName', align: 'center', label: '创建人' }, | ||||
|           { prop: 'updateTime', align: 'center', label: '更新时间' } | ||||
|         ], | ||||
|         ids: [], | ||||
|         tableData: [], | ||||
|         total: 0, | ||||
|         loading: false, | ||||
|         filedList: [] | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.loading = true | ||||
|  | ||||
|       this.dict.load(['EP_riskLevel', 'EP_handleType', 'modeType', 'EP_riskStatus', 'EP_source']).then(() => { | ||||
|         this.getList() | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appassessmentscorev2template/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|             this.loading = false | ||||
|           } else { | ||||
|             this.loading = false | ||||
|           } | ||||
|         }).catch(() => { | ||||
|           this.loading = false | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       unique (arr) { | ||||
|         return arr.filter((item, index) => { | ||||
|           return arr.indexOf(item, 0) === index && !!item | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toDetail (id) { | ||||
|         this.instance.post(`/app/appassessmentscorev2template/queryDetailById?id=${id}`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.filedList = res.data.tableFieldInfos.filter(v => { | ||||
|               return v.inputType === '0' || v.inputType === '1' | ||||
|             }) | ||||
|  | ||||
|             let groups1 = this.unique(this.filedList.map(v => v.groupLevel1Name)) | ||||
|             let groups2 = this.unique(this.filedList.map(v => v.groupLevel2Name)) | ||||
|  | ||||
|             console.log(groups1, groups2) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toAdd (id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Add', | ||||
|           params: { | ||||
|             id: id || '' | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       changeStatus (id, status) { | ||||
|         this.$confirm(`确定${status === '0' ? '启用' : '停用'}该数据?`).then(() => { | ||||
|           this.instance.post(`/app/appassessmentscoretemplate/stopRelease?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success(`${status === '0' ? '启用' : '停用'}成功!`) | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       remove(id) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appassessmentscoretemplate/delete?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| </style> | ||||
							
								
								
									
										202
									
								
								project/hlj/app/AppFormTemplate/components/config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										202
									
								
								project/hlj/app/AppFormTemplate/components/config.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,202 @@ | ||||
| export const components = [ | ||||
| 	{ | ||||
| 		type: 'options', | ||||
| 		tips: '(可重复添加)', | ||||
| 		label: '选项', | ||||
| 		children: [ | ||||
| 			{ | ||||
| 				type: 'radio', | ||||
| 				label: '单选', | ||||
| 				fixedLabel: '单选', | ||||
| 				value: '', | ||||
| 				points: '', | ||||
| 				describe: '', | ||||
| 				icon: 'iconradio', | ||||
| 				isShowPoints: false, | ||||
| 				required: true, | ||||
| 				hasAnswer: false, | ||||
| 				answer: '', | ||||
| 				pointType: '0', | ||||
| 				pointDict: [ | ||||
| 					{ | ||||
| 						dictName: '此题有唯一答案和分值', | ||||
| 						dictValue: '0' | ||||
| 					}, | ||||
| 					{ | ||||
| 						dictName: '每个选项都有对应分值', | ||||
| 						dictValue: '1' | ||||
| 					} | ||||
| 				], | ||||
| 				options: [ | ||||
| 					{ | ||||
| 						label: '选项1', | ||||
| 						value: '', | ||||
| 						point: '', | ||||
| 						img: [] | ||||
| 					}, | ||||
| 					{ | ||||
| 						label: '选项2', | ||||
| 						value: '', | ||||
| 						point: '', | ||||
| 						img: [] | ||||
| 					} | ||||
| 				], | ||||
| 				title: '' | ||||
| 			}, | ||||
| 			{ | ||||
| 				type: 'checkbox', | ||||
| 				label: '多选', | ||||
| 				fixedLabel: '多选', | ||||
| 				describe: '', | ||||
| 				points: '', | ||||
| 				icon: 'iconcheck_box', | ||||
| 				isShowPoints: false, | ||||
| 				required: true, | ||||
| 				hasAnswer: false, | ||||
| 				answer: [], | ||||
| 				value: [], | ||||
| 				pointType: '0', | ||||
| 				pointDict: [ | ||||
| 					{ | ||||
| 						dictName: '此题有唯一答案和分值', | ||||
| 						dictValue: '0' | ||||
| 					}, | ||||
| 					{ | ||||
| 						dictName: '每个选项都有对应分值', | ||||
| 						dictValue: '1' | ||||
| 					}, | ||||
| 					{ | ||||
| 						dictName: '答对几项得几分,答错不得分', | ||||
| 						dictValue: '2' | ||||
| 					} | ||||
| 				], | ||||
| 				options: [ | ||||
| 					{ | ||||
| 						label: '选项1', | ||||
| 						value: '', | ||||
| 						point: '', | ||||
| 						img: [] | ||||
| 					}, | ||||
| 					{ | ||||
| 						label: '选项2', | ||||
| 						point: '', | ||||
| 						value: '', | ||||
| 						img: [] | ||||
| 					} | ||||
| 				], | ||||
| 				title: '' | ||||
| 			}, | ||||
| 			{ | ||||
| 				type: 'select', | ||||
| 				label: '单下拉框', | ||||
| 				fixedLabel: '单下拉框', | ||||
| 				value: '', | ||||
| 				points: '', | ||||
| 				describe: '', | ||||
| 				icon: 'iconSelect', | ||||
| 				isShowPoints: false, | ||||
| 				required: true, | ||||
| 				hasAnswer: false, | ||||
| 				answer: '', | ||||
| 				pointType: '0', | ||||
| 				pointDict: [ | ||||
| 					{ | ||||
| 						dictName: '此题有唯一答案和分值', | ||||
| 						dictValue: '0' | ||||
| 					}, | ||||
| 					{ | ||||
| 						dictName: '每个选项都有对应分值', | ||||
| 						dictValue: '1' | ||||
| 					} | ||||
| 				], | ||||
| 				options: [ | ||||
| 					{ | ||||
| 						label: '选项1', | ||||
| 						value: '', | ||||
| 						point: '', | ||||
| 						img: [] | ||||
| 					}, | ||||
| 					{ | ||||
| 						label: '选项2', | ||||
| 						value: '', | ||||
| 						point: '', | ||||
| 						img: [] | ||||
| 					} | ||||
| 				], | ||||
| 				title: '' | ||||
| 			} | ||||
| 		] | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'input', | ||||
| 		tips: '(可重复添加)', | ||||
| 		label: '填空', | ||||
| 		children: [ | ||||
| 			{ | ||||
| 				type: 'input', | ||||
| 				label: '单行填空', | ||||
| 				describe: '', | ||||
| 				fixedLabel: '单行填空', | ||||
| 				value: '', | ||||
| 				pointType: '0', | ||||
| 				icon: 'icontext_box', | ||||
| 				isShowPoints: false, | ||||
| 				points: '', | ||||
| 				required: true, | ||||
| 				hasAnswer: false, | ||||
| 				placeholder: '请输入...', | ||||
| 				answer: '' | ||||
| 			}, | ||||
| 			{ | ||||
| 				type: 'textarea', | ||||
| 				label: '多行填空', | ||||
| 				describe: '', | ||||
| 				fixedLabel: '多行填空', | ||||
| 				pointType: '0', | ||||
| 				icon: 'icontext_area', | ||||
| 				points: '', | ||||
| 				isShowPoints: false, | ||||
| 				required: true, | ||||
| 				hasAnswer: false, | ||||
| 				answer: '', | ||||
| 				placeholder: '请输入...', | ||||
| 				value: '' | ||||
| 			} | ||||
| 		] | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'annex', | ||||
| 		tips: '(可重复添加)', | ||||
| 		label: '附件', | ||||
| 		children: [ | ||||
| 			{ | ||||
| 				type: 'upload', | ||||
| 				label: '上传图片', | ||||
| 				fixedLabel: '上传图片', | ||||
| 				describe: '', | ||||
| 				value: '', | ||||
| 				icon: 'iconpic', | ||||
| 				isShowPoints: false, | ||||
| 				points: '', | ||||
| 				required: true, | ||||
| 				hasAnswer: false, | ||||
| 				answer: '' | ||||
| 			} | ||||
| 		] | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'layout', | ||||
| 		tips: '(可重复添加)', | ||||
| 		label: '分组', | ||||
| 		children: [ | ||||
| 			{ | ||||
| 				type: 'group', | ||||
| 				label: '卡片', | ||||
| 				fixedLabel: '卡片', | ||||
| 				icon: 'iconpic', | ||||
| 				groupName: '分组标题', | ||||
| 				column: [] | ||||
| 			} | ||||
| 		] | ||||
| 	} | ||||
| ] | ||||
| @@ -57,7 +57,7 @@ module.exports = { | ||||
|     proxy: { | ||||
|       //设置代理,可解决跨5 | ||||
|       '/lan': { | ||||
|         target: 'http://192.168.1.87:9000', | ||||
|         target: 'http://192.168.1.105:19000', | ||||
|         changeOrigin: true, | ||||
|         pathRewrite: { | ||||
|           //地址重写 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user