BUG 26973
This commit is contained in:
		
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -4,21 +4,21 @@ | ||||
|       <ai-search-bar bottomBorder> | ||||
|         <template #left> | ||||
|           <ai-select | ||||
|             v-model="search.type" | ||||
|             @change="search.current = 1, getList()" | ||||
|             placeholder="项目类型" | ||||
|             :selectList="$dict.getDict('questionnaireType')"> | ||||
|               v-model="search.type" | ||||
|               @change="search.current = 1, getList()" | ||||
|               placeholder="项目类型" | ||||
|               :selectList="$dict.getDict('questionnaireType')"> | ||||
|           </ai-select> | ||||
|         </template> | ||||
|         <template #right> | ||||
|           <el-input | ||||
|             v-model="search.title" | ||||
|             size="small" | ||||
|             placeholder="请输入模板名称或创建人" | ||||
|             clearable | ||||
|             @keyup.enter.native="search.current = 1, getList()" | ||||
|             @clear="search.current = 1, search.title = '', getList()" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
|               v-model="search.title" | ||||
|               size="small" | ||||
|               placeholder="请输入模板名称或创建人" | ||||
|               clearable | ||||
|               @keyup.enter.native="search.current = 1, getList()" | ||||
|               @clear="search.current = 1, search.title = '', getList()" | ||||
|               suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
| @@ -28,13 +28,13 @@ | ||||
|         </template> | ||||
|       </ai-search-bar> | ||||
|       <ai-table | ||||
|         :tableData="tableData" | ||||
|         :col-configs="colConfigs" | ||||
|         :total="total" | ||||
|         style="margin-top: 6px;" | ||||
|         :current.sync="search.current" | ||||
|         :size.sync="search.size" | ||||
|         @getList="getList"> | ||||
|           :tableData="tableData" | ||||
|           :col-configs="colConfigs" | ||||
|           :total="total" | ||||
|           style="margin-top: 6px;" | ||||
|           :current.sync="search.current" | ||||
|           :size.sync="search.size" | ||||
|           @getList="getList"> | ||||
|         <el-table-column slot="type" width="120px" label="项目类型" align="center"> | ||||
|           <template slot-scope="{ row }"> | ||||
|             <div class="tags-wrapper"> | ||||
| @@ -53,10 +53,10 @@ | ||||
|         </el-table-column> | ||||
|       </ai-table> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShow" | ||||
|         width="800px" | ||||
|         title="请选择新建模板类型" | ||||
|         @onConfirm="onConfirm"> | ||||
|           :visible.sync="isShow" | ||||
|           width="800px" | ||||
|           title="请选择新建模板类型" | ||||
|           @onConfirm="onConfirm"> | ||||
|         <div class="type-list"> | ||||
|           <div class="type-item" @click="currIndex = 0" :class="[currIndex === 0 ? 'active' : '']"> | ||||
|             <svg class="icon" aria-hidden="true"> | ||||
| @@ -95,189 +95,188 @@ | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|   export default { | ||||
|     name: 'Template', | ||||
| export default { | ||||
|   name: 'Template', | ||||
|  | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object | ||||
|   props: { | ||||
|     instance: Function, | ||||
|     dict: Object | ||||
|   }, | ||||
|  | ||||
|   data() { | ||||
|     return { | ||||
|       search: { | ||||
|         current: 1, | ||||
|         status: '', | ||||
|         type: '', | ||||
|         size: 10, | ||||
|         templateType: 1, | ||||
|         title: '' | ||||
|       }, | ||||
|       currIndex: 0, | ||||
|       isShow: false, | ||||
|       total: 10, | ||||
|       colConfigs: [ | ||||
|         {prop: 'title', label: '模板名称', align: 'left'}, | ||||
|         {slot: 'type', label: '项目类型', align: 'center'}, | ||||
|         {prop: 'quoteCount', label: '引用次数', align: 'center'}, | ||||
|         {prop: 'createUserName', label: '创建人', align: 'center'}, | ||||
|         {prop: 'createUnitName', label: '创建单位', align: 'center'}, | ||||
|         {prop: 'createTime', label: '创建时间', align: 'center'} | ||||
|       ], | ||||
|       tableData: [] | ||||
|     } | ||||
|   }, | ||||
|  | ||||
|   mounted() { | ||||
|     this.getList() | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.instance.post(`/app/appquestionnairetemplate/list`, null, { | ||||
|         params: { | ||||
|           ...this.search | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.tableData = res.data.records | ||||
|           this.total = res.data.total | ||||
|  | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     data () { | ||||
|       return { | ||||
|         search: { | ||||
|           current: 1, | ||||
|           status: '', | ||||
|           type: '', | ||||
|           size: 10, | ||||
|           templateType: 1, | ||||
|           title: '' | ||||
|         }, | ||||
|         currIndex: 0, | ||||
|         isShow: false, | ||||
|         total: 10, | ||||
|         colConfigs: [ | ||||
|           { prop: 'title',  label: '模板名称', align: 'left' }, | ||||
|           { slot: 'type', label: '项目类型', align: 'center' }, | ||||
|           { prop: 'quoteCount',  label: '引用次数', align: 'center' }, | ||||
|           { prop: 'createUserName', label: '创建人', align: 'center' }, | ||||
|           { prop: 'createUnitName', label: '创建单位', align: 'center' }, | ||||
|           { prop: 'createTime', label: '创建时间', align: 'center' } | ||||
|         ], | ||||
|         tableData: [] | ||||
|       } | ||||
|     quote(id, type) { | ||||
|       this.$emit('change', { | ||||
|         type: 'add', | ||||
|         params: { | ||||
|           id, | ||||
|           type, | ||||
|           isQuote: true, | ||||
|           templateType: 0 | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     mounted () { | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appquestionnairetemplate/list`, null, { | ||||
|           params: { | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then(res => { | ||||
|     remove(id) { | ||||
|       this.$confirm('确定删除该数据?').then(() => { | ||||
|         this.instance.post(`/app/appquestionnairetemplate/deleteShareTemplate?ids=${id}`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.tableData = res.data.records | ||||
|             this.total = res.data.total | ||||
|             this.$initWxOpenData() | ||||
|             this.$message.success('删除成功!') | ||||
|             this.getList() | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|       quote (id, type) { | ||||
|         this.$emit('change', { | ||||
|           type: 'add', | ||||
|           params: { | ||||
|             id, | ||||
|             type, | ||||
|             isQuote: true, | ||||
|             templateType: 0 | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|     toAdd(id) { | ||||
|       this.$emit('change', { | ||||
|         type: 'Add', | ||||
|         params: { | ||||
|           id | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|       remove (id) { | ||||
|         this.$confirm('确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/appquestionnairetemplate/deleteShareTemplate?ids=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|       }, | ||||
|     toEdit(id, type) { | ||||
|       this.$emit('change', { | ||||
|         type: 'add', | ||||
|         params: { | ||||
|           id, | ||||
|           type, | ||||
|           templateType: 1 | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|       toAdd (id) { | ||||
|         this.$emit('change', { | ||||
|           type: 'Add', | ||||
|           params: { | ||||
|             id | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       toEdit (id, type) { | ||||
|         this.$emit('change', { | ||||
|           type: 'add', | ||||
|           params: { | ||||
|             id, | ||||
|             type, | ||||
|             templateType: 1 | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onConfirm () { | ||||
|         this.$emit('change', { | ||||
|           type: 'add', | ||||
|           params: { | ||||
|             id: '', | ||||
|             templateType: 1, | ||||
|             type: this.currIndex | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     onConfirm() { | ||||
|       this.$emit('change', { | ||||
|         type: 'add', | ||||
|         params: { | ||||
|           id: '', | ||||
|           templateType: 1, | ||||
|           type: this.currIndex | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
|   .template { | ||||
|     .tags-wrapper { | ||||
|       display: flex; | ||||
|       justify-content: center; | ||||
|     } | ||||
| .template { | ||||
|   .tags-wrapper { | ||||
|     display: flex; | ||||
|     justify-content: center; | ||||
|   } | ||||
|  | ||||
|     .type-list { | ||||
|   .type-list { | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|  | ||||
|     .type-item { | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       justify-content: center; | ||||
|       width: 128px; | ||||
|       height: 64px; | ||||
|       margin-right: 20px; | ||||
|       background: #FFFFFF; | ||||
|       // box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08); | ||||
|       border-radius: 2px; | ||||
|       cursor: pointer; | ||||
|       border: 1px solid #E4E8EF; | ||||
|  | ||||
|       .type-item { | ||||
|         display: flex; | ||||
|         align-items: center; | ||||
|         justify-content: center; | ||||
|         width: 128px; | ||||
|         height: 64px; | ||||
|         margin-right: 20px; | ||||
|         background: #FFFFFF; | ||||
|         border-radius: 2px; | ||||
|         // box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08); | ||||
|         border-radius: 2px; | ||||
|         cursor: pointer; | ||||
|         border: 1px solid #E4E8EF; | ||||
|       svg { | ||||
|         width: 24px; | ||||
|         height: 24px; | ||||
|         margin-right: 8px; | ||||
|       } | ||||
|  | ||||
|         svg { | ||||
|           width: 24px; | ||||
|           height: 24px; | ||||
|           margin-right: 8px; | ||||
|         } | ||||
|       &.active { | ||||
|         border: 1px solid #2266FF; | ||||
|       } | ||||
|  | ||||
|         &.active { | ||||
|           border: 1px solid #2266FF; | ||||
|         } | ||||
|  | ||||
|         &:last-child { | ||||
|           margin-right: 0; | ||||
|         } | ||||
|       &:last-child { | ||||
|         margin-right: 0; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .tags { | ||||
|       display: block; | ||||
|       width: 64px; | ||||
|       height: 24px; | ||||
|       line-height: 24px; | ||||
|       text-align: center; | ||||
|       border-radius: 4px; | ||||
|       font-size: 12px; | ||||
|     } | ||||
|  | ||||
|     .type-0 { | ||||
|       color: #2266FF; | ||||
|       background: rgba(34, 102, 255, 0.1); | ||||
|     } | ||||
|  | ||||
|     .type-1 { | ||||
|       color: rgba(34, 170, 153, 1); | ||||
|       background: rgba(34, 170, 153, 0.1); | ||||
|     } | ||||
|  | ||||
|     .type-2 { | ||||
|       color: rgba(248, 180, 37, 1); | ||||
|       background: rgba(248, 180, 37, 0.1); | ||||
|     } | ||||
|  | ||||
|     .type-3 { | ||||
|       color: rgba(102, 119, 187, 1); | ||||
|       background: rgba(102, 119, 187, 0.1); | ||||
|     } | ||||
|  | ||||
|     .type-4 { | ||||
|       color: rgba(236, 68, 97, 1); | ||||
|       background: rgba(236, 68, 97, 0.1); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .tags { | ||||
|     display: block; | ||||
|     width: 64px; | ||||
|     height: 24px; | ||||
|     line-height: 24px; | ||||
|     text-align: center; | ||||
|     border-radius: 4px; | ||||
|     font-size: 12px; | ||||
|   } | ||||
|  | ||||
|   .type-0 { | ||||
|     color: #2266FF; | ||||
|     background: rgba(34, 102, 255, 0.1); | ||||
|   } | ||||
|  | ||||
|   .type-1 { | ||||
|     color: rgba(34, 170, 153, 1); | ||||
|     background: rgba(34, 170, 153, 0.1); | ||||
|   } | ||||
|  | ||||
|   .type-2 { | ||||
|     color: rgba(248, 180, 37, 1); | ||||
|     background: rgba(248, 180, 37, 0.1); | ||||
|   } | ||||
|  | ||||
|   .type-3 { | ||||
|     color: rgba(102, 119, 187, 1); | ||||
|     background: rgba(102, 119, 187, 0.1); | ||||
|   } | ||||
|  | ||||
|   .type-4 { | ||||
|     color: rgba(236, 68, 97, 1); | ||||
|     background: rgba(236, 68, 97, 0.1); | ||||
|   } | ||||
| } | ||||
| </style> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user