|  | @ -39,11 +39,11 @@ | 
		
	
		
			
				|  |  |           </template> |  |  |           </template> | 
		
	
		
			
				|  |  |         </el-table-column> |  |  |         </el-table-column> | 
		
	
		
			
				|  |  |       </el-table> |  |  |       </el-table> | 
		
	
		
			
				|  |  |       <!--表单渲染--> |  |  |  | 
		
	
		
			
				|  |  |       <eForm ref="cuform" /> |  |  |  | 
		
	
		
			
				|  |  |     </div> |  |  |     </div> | 
		
	
		
			
				|  |  |  |  |  |     <!--表单渲染--> | 
		
	
		
			
				|  |  |  |  |  |     <eForm ref="cuform" @refresh="initData" /> | 
		
	
		
			
				|  |  |     <!--排序对话框组件--> |  |  |     <!--排序对话框组件--> | 
		
	
		
			
				|  |  |     <sortDialog ref="sort" @doSort="doSort" /> |  |  |  | 
		
	
		
			
				|  |  |  |  |  |     <sortDialog ref="sort" @refresh="initData" /> | 
		
	
		
			
				|  |  |     <!--删除对话框组件--> |  |  |     <!--删除对话框组件--> | 
		
	
		
			
				|  |  |     <el-dialog title="移除字段" :visible.sync="deleteVisible"> |  |  |     <el-dialog title="移除字段" :visible.sync="deleteVisible"> | 
		
	
		
			
				|  |  |       <span class="dialog-right-top" /> |  |  |       <span class="dialog-right-top" /> | 
		
	
	
		
			
				|  | @ -62,8 +62,10 @@ | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | <script> |  |  | <script> | 
		
	
		
			
				|  |  | import { FetchArchivesTypeManage } from '@/api/category/category' |  |  | import { FetchArchivesTypeManage } from '@/api/category/category' | 
		
	
		
			
				|  |  |  |  |  | import { edit } from '@/api/category/listBrowsing' | 
		
	
		
			
				|  |  | import eForm from './module/form' |  |  | import eForm from './module/form' | 
		
	
		
			
				|  |  | import sortDialog from './module/sortDialog' |  |  | import sortDialog from './module/sortDialog' | 
		
	
		
			
				|  |  |  |  |  | import Vue from 'vue' | 
		
	
		
			
				|  |  | 
 |  |  | 
 | 
		
	
		
			
				|  |  | export default { |  |  | export default { | 
		
	
		
			
				|  |  |   components: { eForm, sortDialog }, |  |  |   components: { eForm, sortDialog }, | 
		
	
	
		
			
				|  | @ -84,12 +86,6 @@ export default { | 
		
	
		
			
				|  |  |         sort: ['admin', 'orderingRule:sort'] |  |  |         sort: ['admin', 'orderingRule:sort'] | 
		
	
		
			
				|  |  |       }, |  |  |       }, | 
		
	
		
			
				|  |  |       deleteVisible: false, |  |  |       deleteVisible: false, | 
		
	
		
			
				|  |  |       // form: { |  |  |  | 
		
	
		
			
				|  |  |       //   verifyCode: '' |  |  |  | 
		
	
		
			
				|  |  |       // }, |  |  |  | 
		
	
		
			
				|  |  |       // formLabelWidth: '110px', |  |  |  | 
		
	
		
			
				|  |  |       // btn: '', |  |  |  | 
		
	
		
			
				|  |  |       // showVerifyDialog: true, |  |  |  | 
		
	
		
			
				|  |  |       sortLoading: false, |  |  |       sortLoading: false, | 
		
	
		
			
				|  |  |       delAllLoading: false, |  |  |       delAllLoading: false, | 
		
	
		
			
				|  |  |       table: { |  |  |       table: { | 
		
	
	
		
			
				|  | @ -123,10 +119,10 @@ export default { | 
		
	
		
			
				|  |  |   }, |  |  |   }, | 
		
	
		
			
				|  |  |   methods: { |  |  |   methods: { | 
		
	
		
			
				|  |  |     initData() { |  |  |     initData() { | 
		
	
		
			
				|  |  |       FetchArchivesTypeManage({ categoryId: this.selectedCategory.id, isDataType: 2, isInput: 'true' }).then((res) => { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       FetchArchivesTypeManage({ categoryId: this.selectedCategory.id, isDataType: 2, isInput: 'true', isDisplay: 'true' }).then((res) => { | 
		
	
		
			
				|  |  |         this.table.right.data.splice(0, this.table.right.data.length) |  |  |         this.table.right.data.splice(0, this.table.right.data.length) | 
		
	
		
			
				|  |  |         this.table.left.data.splice(0, this.table.left.data.length) |  |  |         this.table.left.data.splice(0, this.table.left.data.length) | 
		
	
		
			
				|  |  |         res.forEach((item) => { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |         res.sort((item) => { return item.queue - item.queue }).forEach((item) => { | 
		
	
		
			
				|  |  |           if (item.displayOrderBy) { |  |  |           if (item.displayOrderBy) { | 
		
	
		
			
				|  |  |             this.table.right.data.push(item) |  |  |             this.table.right.data.push(item) | 
		
	
		
			
				|  |  |           } else { |  |  |           } else { | 
		
	
	
		
			
				|  | @ -142,18 +138,16 @@ export default { | 
		
	
		
			
				|  |  |       this.table[tableName].selections = val |  |  |       this.table[tableName].selections = val | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     toAdd() { |  |  |     toAdd() { | 
		
	
		
			
				|  |  |       this.$refs.cuform.formData = this.table.left.selections.map((item) => { |  |  |  | 
		
	
		
			
				|  |  |         const field = { |  |  |  | 
		
	
		
			
				|  |  |           id: item.id, |  |  |  | 
		
	
		
			
				|  |  |           fieldCnName: item.fieldCnName, |  |  |  | 
		
	
		
			
				|  |  |           displayOrderBy: 'asc' |  |  |  | 
		
	
		
			
				|  |  |         } |  |  |  | 
		
	
		
			
				|  |  |         return field |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.table.left.selections.forEach((item) => { | 
		
	
		
			
				|  |  |  |  |  |         Vue.set(item, 'displayOrderBy', 'asc') | 
		
	
		
			
				|  |  |       }) |  |  |       }) | 
		
	
		
			
				|  |  |  |  |  |       this.$refs.cuform.title = '新增字段' | 
		
	
		
			
				|  |  |  |  |  |       this.$refs.cuform.formData.fields = this.table.left.selections | 
		
	
		
			
				|  |  |       this.$refs.cuform.cuDialogVisible = true |  |  |       this.$refs.cuform.cuDialogVisible = true | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     toEdit() { |  |  |     toEdit() { | 
		
	
		
			
				|  |  |       this.$refs.cuform.formData = this.table.right.selections |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       this.$refs.cuform.title = '编辑字段' | 
		
	
		
			
				|  |  |  |  |  |       this.$refs.cuform.formData.fields = this.table.right.selections | 
		
	
		
			
				|  |  |       this.$refs.cuform.cuDialogVisible = true |  |  |       this.$refs.cuform.cuDialogVisible = true | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     toDelete() { |  |  |     toDelete() { | 
		
	
	
		
			
				|  | @ -162,7 +156,12 @@ export default { | 
		
	
		
			
				|  |  |     handleDelConfirm() { |  |  |     handleDelConfirm() { | 
		
	
		
			
				|  |  |       this.deleteVisible = false |  |  |       this.deleteVisible = false | 
		
	
		
			
				|  |  |       this.delAllLoading = true |  |  |       this.delAllLoading = true | 
		
	
		
			
				|  |  |       // sort(encrypt(this.form.verifyCode)).then((res) => { |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       const deleteData = this.table.right.selections.map((item) => { | 
		
	
		
			
				|  |  |  |  |  |         item.displayOrderBy = null | 
		
	
		
			
				|  |  |  |  |  |         item.queue = null | 
		
	
		
			
				|  |  |  |  |  |         return item | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |  |  |  |       edit(deleteData).then((res) => { | 
		
	
		
			
				|  |  |         this.delAllLoading = false |  |  |         this.delAllLoading = false | 
		
	
		
			
				|  |  |         this.$notify({ |  |  |         this.$notify({ | 
		
	
		
			
				|  |  |           title: '删除成功', |  |  |           title: '删除成功', | 
		
	
	
		
			
				|  | @ -170,29 +169,11 @@ export default { | 
		
	
		
			
				|  |  |           duration: 2500 |  |  |           duration: 2500 | 
		
	
		
			
				|  |  |         }) |  |  |         }) | 
		
	
		
			
				|  |  |         this.initData() |  |  |         this.initData() | 
		
	
		
			
				|  |  |       // }).catch(() => { |  |  |  | 
		
	
		
			
				|  |  |       //   this.delAllLoading = false |  |  |  | 
		
	
		
			
				|  |  |       // }) |  |  |  | 
		
	
		
			
				|  |  |  |  |  |       }) | 
		
	
		
			
				|  |  |     }, |  |  |     }, | 
		
	
		
			
				|  |  |     toSort() { |  |  |     toSort() { | 
		
	
		
			
				|  |  |       // findSubsetById(data[0].id).then(res => { |  |  |  | 
		
	
		
			
				|  |  |       this.$refs.sort.sortTableData = this.table.right.data |  |  |       this.$refs.sort.sortTableData = this.table.right.data | 
		
	
		
			
				|  |  |       this.$refs.sort.sortVisible = true |  |  |       this.$refs.sort.sortVisible = true | 
		
	
		
			
				|  |  |       // }) |  |  |  | 
		
	
		
			
				|  |  |     }, |  |  |  | 
		
	
		
			
				|  |  |     doSort(data) { |  |  |  | 
		
	
		
			
				|  |  |       this.sortLoading = true |  |  |  | 
		
	
		
			
				|  |  |       // sort(encrypt(this.form.verifyCode)).then((res) => { |  |  |  | 
		
	
		
			
				|  |  |       this.sortLoading = false |  |  |  | 
		
	
		
			
				|  |  |       this.$notify({ |  |  |  | 
		
	
		
			
				|  |  |         title: '保存成功', |  |  |  | 
		
	
		
			
				|  |  |         type: 'success', |  |  |  | 
		
	
		
			
				|  |  |         duration: 2500 |  |  |  | 
		
	
		
			
				|  |  |       }) |  |  |  | 
		
	
		
			
				|  |  |       this.getRightTableData() |  |  |  | 
		
	
		
			
				|  |  |       // }).catch(() => { |  |  |  | 
		
	
		
			
				|  |  |       //   this.sortLoading = false |  |  |  | 
		
	
		
			
				|  |  |       // }) |  |  |  | 
		
	
		
			
				|  |  |     } |  |  |     } | 
		
	
		
			
				|  |  |   } |  |  |   } | 
		
	
		
			
				|  |  | } |  |  | } | 
		
	
	
		
			
				|  | 
 |