diff --git a/src/api/system/archivesScope.js b/src/api/system/archivesScope.js
new file mode 100644
index 0000000..daad437
--- /dev/null
+++ b/src/api/system/archivesScope.js
@@ -0,0 +1,54 @@
+import request from '@/utils/request'
+
+// 获取归档范围列表
+export function FetchInitArchivesScope(params) {
+ return request({
+ url: 'api/archivesScope/initArchivesScope',
+ method: 'get',
+ params
+ })
+}
+
+// 获取子集
+export function FetchSonArchivesScope(params) {
+ return request({
+ url: 'api/archivesScope/getSonArchivesScope',
+ method: 'get',
+ params
+ })
+}
+
+// 获取树
+export function FetchArchivesScopeTree(params) {
+ return request({
+ url: 'api/archivesScope/getArchivesScopeTree',
+ method: 'get',
+ params
+ })
+}
+
+export function add(data) {
+ return request({
+ url: 'api/archivesScope/editArchivesScope',
+ method: 'post',
+ data
+ })
+}
+
+export function edit(data) {
+ return request({
+ url: 'api/archivesScope/editArchivesScope',
+ method: 'post',
+ data
+ })
+}
+
+export function del(data) {
+ return request({
+ url: 'api/archivesScope/delArchivesClass',
+ method: 'post',
+ data
+ })
+}
+
+export default { add, edit, del, FetchInitArchivesScope, FetchSonArchivesScope, FetchArchivesScopeTree }
diff --git a/src/assets/styles/yxk-admin.scss b/src/assets/styles/yxk-admin.scss
index 5f79619..419e083 100644
--- a/src/assets/styles/yxk-admin.scss
+++ b/src/assets/styles/yxk-admin.scss
@@ -1786,7 +1786,7 @@ input[type ='number'] {
font-weight: normal;
font-size: 12px;
line-height: 20px;
- background: url('~@/assets/images/icon/tip-icon.png') no-repeat left center;
+ background: url('~@/assets/images/icon/tip-icon.png') no-repeat left 6px;
background-size: 14px 14px;
}
diff --git a/src/views/system/archiveScopeManage/index.vue b/src/views/system/archiveScopeManage/index.vue
index 2d76667..9520f85 100644
--- a/src/views/system/archiveScopeManage/index.vue
+++ b/src/views/system/archiveScopeManage/index.vue
@@ -8,202 +8,57 @@
-
+
-
-
-
-
-
-
-
- 新增
-
-
-
- 编辑
-
-
-
- 删除
-
-
-
- 注意:门类节点下才可新增归档范围定义
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
此操作将移除当前所选范围
-
你是否还要继续?
-
-
-
-
+
+
+
diff --git a/src/views/system/archivesClassify/module/tableList.vue b/src/views/system/archivesClassify/module/tableList.vue
index ce7212b..0d14669 100644
--- a/src/views/system/archivesClassify/module/tableList.vue
+++ b/src/views/system/archivesClassify/module/tableList.vue
@@ -45,6 +45,7 @@
flat
:multiple="false"
:normalizer="normalizer"
+ @select="selectCategoryTree"
/>
@@ -76,12 +77,12 @@
label="上级分类"
prop="pid"
>
+
@@ -247,7 +248,12 @@ export default {
// 新增与编辑前做的操作
[CRUD.HOOK.afterToCU](crud, form) {
this.getCategoryDataTree()
- this.getClassifyTree()
+ if (this.crud.status.edit) {
+ this.getClassifyTree(this.form.categoryId)
+ } else {
+ this.form.categoryId = null
+ this.classifyOptions = []
+ }
if (form.id != null) {
if (form.pid === null) {
form.isTop = '1'
@@ -256,6 +262,10 @@ export default {
}
}
},
+ selectCategoryTree(val) {
+ console.log(val)
+ this.getClassifyTree(val.id)
+ },
filterData(data) {
return data.filter(node => {
if (node.children && node.children.length > 0) {
@@ -269,8 +279,8 @@ export default {
this.categoryDatas = this.filterData(res)
})
},
- getClassifyTree() {
- crudClassify.FetchArchivesClassTree().then(res => {
+ getClassifyTree(categoryId) {
+ crudClassify.FetchArchivesClassTree({ 'categoryId': categoryId }).then(res => {
this.classifyOptions = res.map(function(obj) {
if (obj.childArchivesClass !== null) {
obj.hasChildren = true
@@ -393,6 +403,29 @@ export default {
}).catch(() => {
})
},
+ toDelete(datas) {
+ this.$confirm('此操作将删除当前所选' + this.crud.title + '你是否还要继续?', '提示', {
+ confirmButtonText: '继续',
+ cancelButtonText: '取消',
+ type: 'warning',
+ dangerouslyUseHTMLString: true
+ }).then(() => {
+ this.crud.delAllLoading = true
+ const ids = []
+ datas.forEach(val => {
+ ids.push(val.id)
+ })
+ crudClassify.del(ids).then(() => {
+ this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
+ this.crud.delAllLoading = false
+ this.crud.refresh()
+ }).catch(err => {
+ this.crud.delAllLoading = false
+ console.log(err)
+ })
+ }).catch(() => {
+ })
+ },
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children
diff --git a/src/views/system/fieldCorresManage/index.vue b/src/views/system/fieldCorresManage/index.vue
index 68941e5..dc5f3a0 100644
--- a/src/views/system/fieldCorresManage/index.vue
+++ b/src/views/system/fieldCorresManage/index.vue
@@ -103,9 +103,9 @@