diff --git a/src/views/archivesConfig/dict/dictDetail.vue b/src/views/archivesConfig/dict/dictDetail.vue index 4b6321b..f20c57a 100644 --- a/src/views/archivesConfig/dict/dictDetail.vue +++ b/src/views/archivesConfig/dict/dictDetail.vue @@ -170,9 +170,6 @@ export default { diff --git a/src/views/category/fileNoFormat/index.vue b/src/views/category/fileNoFormat/index.vue index 02df37c..24d995c 100644 --- a/src/views/category/fileNoFormat/index.vue +++ b/src/views/category/fileNoFormat/index.vue @@ -34,10 +34,21 @@ - + - + + + + + +
+

确定要移除当前字段吗?

+ +
+
@@ -58,7 +69,7 @@ export default { del: ['admin', 'fileNoFormat:delete'], sort: ['admin', 'fileNoFormat:sort'] }, - // verifyDialogVisible: false, + deleteVisible: false, // form: { // verifyCode: '' // }, @@ -88,44 +99,17 @@ export default { // } // this.crud.toQuery() // verifyMaintenance(encrypt(this.form.verifyCode)).then((res) => {} - this.table.left.data = data1.rows - this.table.right.data = data2.rows + this.getLeftTableData() + this.getRightTableData() }, methods: { - // [CRUD.HOOK.beforeToCU](crud, form, btn) { - // if (this.showVerifyDialog) { - // // 打开输入验证码对话框 - // this.verifyDialogVisible = true - // this.btn = btn - // return false - // } - // }, - // [CRUD.HOOK.beforeToEdit](crud, form, btn) { - // if (form.isColumnLength === null) { - // form.isColumnLength = undefined - // } - // }, - handleConfirm() { - // verifyMaintenance(encrypt(this.form.verifyCode)).then((res) => { - // if (res) { - // // 关闭输入验证码对话框 - // this.verifyDialogVisible = false - // this.form.verifyCode = '' - // this.showVerifyDialog = false - // if (this.btn === 'add') { - // this.crud.toAdd() - // } else if (this.btn === 'edit') { - // this.crud.toEdit(this.crud.selections[0]) - // } - // this.showVerifyDialog = true - // } else { - // this.$message.error('验证码错误!') - // } - // }) + getLeftTableData() { + // verifyMaintenance(encrypt(this.form.verifyCode)).then((res) => {} + this.table.left.data = data1.rows }, - handleClose(done) { - this.form.verifyCode = '' - done() + getRightTableData() { + // verifyMaintenance(encrypt(this.form.verifyCode)).then((res) => {} + this.table.right.data = data2.rows }, clickRowHandler(row, column, e, tableName) { this.$refs[tableName].toggleRowSelection(row) @@ -134,16 +118,51 @@ export default { this.table[tableName].selections = val }, toAdd() { + this.$refs.cuform.formData.fields = this.table.left.selections + this.$refs.cuform.cuDialogVisible = true }, toEdit() { + this.$refs.cuform.formData.fields = this.table.right.selections + this.$refs.cuform.cuDialogVisible = true }, toDelete() { + this.deleteVisible = true + }, + handleDelConfirm() { + this.deleteVisible = false + this.delAllLoading = true + // sort(encrypt(this.form.verifyCode)).then((res) => { + this.delAllLoading = false + this.$notify({ + title: '删除成功', + type: 'success', + duration: 2500 + }) + this.getRightTableData() + this.getLeftTableData() + // }).catch(() => { + // this.delAllLoading = false + // }) }, toSort() { // findSubsetById(data[0].id).then(res => { this.$refs.sort.sortTableData = this.table.right.data 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 + // }) } } } diff --git a/src/views/category/fileNoFormat/module/form.vue b/src/views/category/fileNoFormat/module/form.vue index f2d6b14..794e86b 100644 --- a/src/views/category/fileNoFormat/module/form.vue +++ b/src/views/category/fileNoFormat/module/form.vue @@ -1,107 +1,54 @@ diff --git a/src/views/category/fileNoFormat/module/sortDialog.vue b/src/views/category/fileNoFormat/module/sortDialog.vue index 637f87f..8812ea3 100644 --- a/src/views/category/fileNoFormat/module/sortDialog.vue +++ b/src/views/category/fileNoFormat/module/sortDialog.vue @@ -4,8 +4,9 @@
- - + 提示:请通过拖动鼠标来调整当前顺序 + + - - + + + + - +
+ + + + + + +
+

确定要移除当前字段吗?

+ +
+
@@ -44,9 +62,10 @@ import data1 from './data1.json' import data2 from './data2.json' import eForm from './module/form' +import sortDialog from './module/sortDialog' export default { - components: { eForm }, + components: { eForm, sortDialog }, data() { return { permission: { @@ -55,7 +74,7 @@ export default { del: ['admin', 'orderingRule:delete'], sort: ['admin', 'orderingRule:sort'] }, - // verifyDialogVisible: false, + deleteVisible: false, // form: { // verifyCode: '' // }, @@ -85,44 +104,17 @@ export default { // } // this.crud.toQuery() // verifyMaintenance(encrypt(this.form.verifyCode)).then((res) => {} - this.table.left.data = data1.rows - this.table.right.data = data2.rows + this.getLeftTableData() + this.getRightTableData() }, methods: { - // [CRUD.HOOK.beforeToCU](crud, form, btn) { - // if (this.showVerifyDialog) { - // // 打开输入验证码对话框 - // this.verifyDialogVisible = true - // this.btn = btn - // return false - // } - // }, - // [CRUD.HOOK.beforeToEdit](crud, form, btn) { - // if (form.isColumnLength === null) { - // form.isColumnLength = undefined - // } - // }, - handleConfirm() { - // verifyMaintenance(encrypt(this.form.verifyCode)).then((res) => { - // if (res) { - // // 关闭输入验证码对话框 - // this.verifyDialogVisible = false - // this.form.verifyCode = '' - // this.showVerifyDialog = false - // if (this.btn === 'add') { - // this.crud.toAdd() - // } else if (this.btn === 'edit') { - // this.crud.toEdit(this.crud.selections[0]) - // } - // this.showVerifyDialog = true - // } else { - // this.$message.error('验证码错误!') - // } - // }) + getLeftTableData() { + // verifyMaintenance(encrypt(this.form.verifyCode)).then((res) => {} + this.table.left.data = data1.rows }, - handleClose(done) { - this.form.verifyCode = '' - done() + getRightTableData() { + // verifyMaintenance(encrypt(this.form.verifyCode)).then((res) => {} + this.table.right.data = data2.rows }, clickRowHandler(row, column, e, tableName) { this.$refs[tableName].toggleRowSelection(row) @@ -131,12 +123,51 @@ export default { this.table[tableName].selections = val }, toAdd() { + this.$refs.cuform.formData.fields = this.table.left.selections + this.$refs.cuform.cuDialogVisible = true }, toEdit() { + this.$refs.cuform.formData.fields = this.table.right.selections + this.$refs.cuform.cuDialogVisible = true }, toDelete() { + this.deleteVisible = true + }, + handleDelConfirm() { + this.deleteVisible = false + this.delAllLoading = true + // sort(encrypt(this.form.verifyCode)).then((res) => { + this.delAllLoading = false + this.$notify({ + title: '删除成功', + type: 'success', + duration: 2500 + }) + this.getRightTableData() + this.getLeftTableData() + // }).catch(() => { + // this.delAllLoading = false + // }) }, toSort() { + // findSubsetById(data[0].id).then(res => { + this.$refs.sort.sortTableData = this.table.right.data + 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 + // }) } } } diff --git a/src/views/category/orderingRule/module/form.vue b/src/views/category/orderingRule/module/form.vue index f2d6b14..17cb257 100644 --- a/src/views/category/orderingRule/module/form.vue +++ b/src/views/category/orderingRule/module/form.vue @@ -1,107 +1,56 @@ diff --git a/src/views/category/orderingRule/module/sortDialog.vue b/src/views/category/orderingRule/module/sortDialog.vue new file mode 100644 index 0000000..1d9cfaa --- /dev/null +++ b/src/views/category/orderingRule/module/sortDialog.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/views/category/sortDialog.vue b/src/views/category/sortDialog.vue index 1ecc9c0..5c79171 100644 --- a/src/views/category/sortDialog.vue +++ b/src/views/category/sortDialog.vue @@ -4,8 +4,9 @@
- - + 提示:请通过拖动鼠标来调整当前顺序 + +