diff --git a/src/api/system/archivesScope.js b/src/api/system/archivesScope.js index daad437..31e407e 100644 --- a/src/api/system/archivesScope.js +++ b/src/api/system/archivesScope.js @@ -51,4 +51,13 @@ export function del(data) { }) } -export default { add, edit, del, FetchInitArchivesScope, FetchSonArchivesScope, FetchArchivesScopeTree } +// 根据子门类id获取档案归档范围 +export function FetchArchivesScopeByCategoryId(params) { + return request({ + url: 'api/archivesScope/getArchivesScopeByCategoryId', + method: 'get', + params + }) +} + +export default { add, edit, del, FetchInitArchivesScope, FetchSonArchivesScope, FetchArchivesScopeTree, FetchArchivesScopeByCategoryId } diff --git a/src/api/system/fileLibrary/fileLibrary.js b/src/api/system/fileLibrary/fileLibrary.js index a49c61e..79d9083 100644 --- a/src/api/system/fileLibrary/fileLibrary.js +++ b/src/api/system/fileLibrary/fileLibrary.js @@ -52,6 +52,14 @@ export function FetchInitDocumentField(params) { }) } +export function FetchDocumentFieldManage(params) { + return request({ + url: 'api/document/documentFieldManage', + method: 'get', + params + }) +} + // 著录界面排序 export function FetchUpardicSort(data) { return request({ @@ -70,4 +78,4 @@ export function FetchInitDocumentFieldByPid(params) { }) } -export default { add, edit, del, sort, FetchDocumentMenu, FetchInitDocumentFieldByPid } +export default { add, edit, del, sort, FetchDocumentMenu, FetchDocumentFieldManage, FetchInitDocumentFieldByPid } diff --git a/src/assets/iconfonts/light/iconfont.css b/src/assets/iconfonts/light/iconfont.css index c92fd03..6d6578b 100644 --- a/src/assets/iconfonts/light/iconfont.css +++ b/src/assets/iconfonts/light/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 3966148 */ - src: url('iconfont.woff2?t=1688977345185') format('woff2'), - url('iconfont.woff?t=1688977345185') format('woff'), - url('iconfont.ttf?t=1688977345185') format('truetype'); + src: url('iconfont.woff2?t=1697608535383') format('woff2'), + url('iconfont.woff?t=1697608535383') format('woff'), + url('iconfont.ttf?t=1697608535383') format('truetype'); } .iconfont { @@ -13,6 +13,14 @@ -moz-osx-font-smoothing: grayscale; } +.icon-gengduo1:before { + content: "\e660"; +} + +.icon-wancheng:before { + content: "\e65f"; +} + .icon-zhengque:before { content: "\e653"; } diff --git a/src/assets/iconfonts/light/iconfont.js b/src/assets/iconfonts/light/iconfont.js index e4ae63f..96d0262 100644 --- a/src/assets/iconfonts/light/iconfont.js +++ b/src/assets/iconfonts/light/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_3966148='',function(c){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,i,o,t,s,v=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_3966148,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?v(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,t=c.document,s=!1,p(),t.onreadystatechange=function(){"complete"==t.readyState&&(t.onreadystatechange=null,z())})}function z(){s||(s=!0,o())}function p(){try{t.documentElement.doScroll("left")}catch(a){return void setTimeout(p,50)}z()}}(window); \ No newline at end of file +window._iconfont_svg_string_3966148='',function(c){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,i,o,t,s,v=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_3966148,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?v(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,t=c.document,s=!1,p(),t.onreadystatechange=function(){"complete"==t.readyState&&(t.onreadystatechange=null,z())})}function z(){s||(s=!0,o())}function p(){try{t.documentElement.doScroll("left")}catch(a){return void setTimeout(p,50)}z()}}(window); \ No newline at end of file diff --git a/src/assets/iconfonts/light/iconfont.json b/src/assets/iconfonts/light/iconfont.json index 79e12e9..cca534c 100644 --- a/src/assets/iconfonts/light/iconfont.json +++ b/src/assets/iconfonts/light/iconfont.json @@ -5,6 +5,20 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "37728681", + "name": "更多", + "font_class": "gengduo1", + "unicode": "e660", + "unicode_decimal": 58976 + }, + { + "icon_id": "36940610", + "name": "完成", + "font_class": "wancheng", + "unicode": "e65f", + "unicode_decimal": 58975 + }, { "icon_id": "35809396", "name": "正确", diff --git a/src/assets/iconfonts/light/iconfont.ttf b/src/assets/iconfonts/light/iconfont.ttf index 7f5da43..6a747f6 100644 Binary files a/src/assets/iconfonts/light/iconfont.ttf and b/src/assets/iconfonts/light/iconfont.ttf differ diff --git a/src/assets/iconfonts/light/iconfont.woff b/src/assets/iconfonts/light/iconfont.woff index 8b15d2d..fd0f91c 100644 Binary files a/src/assets/iconfonts/light/iconfont.woff and b/src/assets/iconfonts/light/iconfont.woff differ diff --git a/src/assets/iconfonts/light/iconfont.woff2 b/src/assets/iconfonts/light/iconfont.woff2 index ddcaef2..101603f 100644 Binary files a/src/assets/iconfonts/light/iconfont.woff2 and b/src/assets/iconfonts/light/iconfont.woff2 differ diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue index 633d5ac..d8204d4 100644 --- a/src/views/components/category/PreviewForm.vue +++ b/src/views/components/category/PreviewForm.vue @@ -10,7 +10,7 @@ v-if="item.isInputClass === 'select'" v-model="addOrUpdateForm[item.fieldName]" :options="item.options" - :normalizer="normalizer" + :normalizer=" isTableType === 1 ? normalizerFonds : (isTableType === 2 ? normalizerClassify : normalizer)" :clearable="false" placeholder="" :style="{ width: item.editLength+'px'}" @@ -37,7 +37,7 @@ @input="autoAddZero(item.isFilling, item.fieldName, addOrUpdateForm[item.fieldName], item.fillingDigit)" @blur="isRepeatHandle(item)" > - + @@ -71,15 +71,28 @@ - +
- + - - - + + + + + + + + + + + + + + + +
@@ -94,7 +107,10 @@ import { getNoFormatField } from '@/api/system/category/fileNoFormat' import draggable from 'vuedraggable' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' -import { FetchFindAllSubsetById } from '@/api/archivesConfig/dictDetail' +// import { FetchFindAllSubsetById } from '@/api/archivesConfig/dictDetail' +import { FetchSonDictionaryList } from '@/api/system/dict' +import { FetchFondsAll } from '@/api/system/fonds' +import { FetchArchivesClassTree, FetchSonArchivesClass } from '@/api/system/archivesClass' import { parseTime, getCurrentTime } from '@/utils/index' export default { @@ -144,6 +160,8 @@ export default { }, rules: { }, + isTableType: 1, + tableTitle: '字典列表', popoverTableData: [], // popover - popoverTableData popoverVisible: false, // popover - visible currentFieldName: null, // popover 当前fieldName @@ -153,16 +171,7 @@ export default { result: null, autoMatic: null, // isType: 'category', - normalizer(node) { - if (node.childMenus == null || node.childMenus === 'null') { - delete node.childMenus - } - return { - id: node.dicName, - label: node.dicName, - children: node.childMenus - } - }, + file: null, // 附件 change fileNames: '', // 附件 - name formatType: '', // 附件 - type @@ -200,6 +209,36 @@ export default { // } }, methods: { + normalizer(node) { + if (node.childMenus == null || node.childMenus === 'null') { + delete node.childMenus + } + return { + id: node.dictionaryId, + label: node.dictionaryName, + children: node.childMenus + } + }, + normalizerClassify(node) { + if (node.childArchivesClass && !node.childArchivesClass.length) { + delete node.childArchivesClass + } + return { + id: node.id, + label: node.name, + children: node.childArchivesClass + } + }, + normalizerFonds(node) { + if (node.childMenus == null || node.childMenus === 'null') { + delete node.childMenus + } + return { + id: node.id, + label: node.fondsName, + children: node.childMenus + } + }, // 递归查询字典名称对应的字典代码 // getNode(tree, dicName) { // for (let i = 0; i < tree.length; i++) { @@ -245,12 +284,15 @@ export default { } else { const fieldInfo = this.formPreviewData.find(element => element.fieldName === val.fieldName) if (fieldInfo.isInputClass === 'select' || fieldInfo.isInputClass === 'popover') { - await FetchFindAllSubsetById({ id: fieldInfo.dictionaryConfigId.id }).then(res => { + const params = { + 'pid': fieldInfo.dictionaryId.id + } + await FetchSonDictionaryList(params).then(res => { const option = this.getNode(res, this.addOrUpdateForm[val.fieldName]) if (option) { const obj = {} obj.name = val.fieldName - obj.val = option[0].dicCode + val.connector + obj.val = option[0].dictionaryCode + val.connector obj.sequence = val.sequence // string += '' + option[0].dicCode + val.connector getAutoFiledVal.push(obj) @@ -293,16 +335,83 @@ export default { }, // 获取对应字典子集数据 getAllSubset(item) { - if (item.dictionaryConfigId) { - FetchFindAllSubsetById({ id: item.dictionaryConfigId.id }).then(res => { - if (item.isInputClass === 'select') { - this.$set(item, 'options', res) - } else if (item.isInputClass === 'popover') { - this.popoverTableData = res + console.log('item', item) + if (item.mateData === 1) { + this.getFondsDatas(item) + } else if (item.mateData === 2) { + if (item.categoryId) { + this.getClassifyTree(item) + } + } else { + if (item.dictionaryId) { + const params = { + 'pid': item.dictionaryId.id } - }) + this.isTableType = 3 + this.tableTitle = '字典列表' + FetchSonDictionaryList(params).then(res => { + if (item.isInputClass === 'select') { + this.$set(item, 'options', res) + } else if (item.isInputClass === 'popover') { + this.popoverTableData = res + } + }) + } } }, + getFondsDatas(item) { + const parent = {} + parent.id = 0 + parent.fondsName = '全宗选择' + this.isTableType = 1 + this.tableTitle = '全宗列表' + FetchFondsAll().then(res => { + if (item.isInputClass === 'select') { + this.$set(item, 'options', res) + } else if (item.isInputClass === 'popover') { + this.popoverTableData = res + } + }) + }, + getClassifyTree(item) { + console.log('666', this.selectedCategory) + this.isTableType = 2 + this.tableTitle = '分类列表' + FetchArchivesClassTree({ 'categoryId': this.selectedCategory.pid }).then(res => { + if (item.isInputClass === 'select') { + const classifyOptions = res.map(function(obj) { + if (obj.childArchivesClass !== null) { + obj.hasChildren = true + } else { + obj.hasChildren = false + } + if (obj.hasChildren) { + obj.children = null + } + return obj + }) + this.$set(item, 'options', classifyOptions) + } else if (item.isInputClass === 'popover') { + this.popoverTableData = res + } + }) + }, + getSonClass(tree, treeNode, resolve) { + setTimeout(() => { + FetchSonArchivesClass({ pid: tree.id }).then(res => { + const data = res.map(function(obj) { + if (obj.sonNum !== 0 && obj.sonNum) { + obj.hasChildren = true + obj.children = null + } else { + obj.hasChildren = false + } + return obj + }) + resolve(data) + }) + }, 100) + }, // 判断重复api handlerIsRepeat(params, item) { if (this.isDesFormType !== 'prearchiveLibrary') { @@ -381,9 +490,11 @@ export default { } this.handlerIsRepeat(params, this.treeCurrentFiled) } - const index = this.autoMatic.findIndex(i => this.treeCurrentFiled.fieldName === i.fieldName) - if (index !== -1) { - this.handleAuto() + if (this.isDesFormType !== 'prearchiveLibrary') { + const index = this.autoMatic.findIndex(i => this.treeCurrentFiled.fieldName === i.fieldName) + if (index !== -1) { + this.handleAuto() + } } }, // popover - table 单选 @@ -394,14 +505,22 @@ export default { // popover - table 选中得项 handleSelectionChange(val) { if (val.length > 0) { - this.addOrUpdateForm[this.currentFieldName] = val[0].dicName + if (this.isTableType === 1) { + this.addOrUpdateForm[this.currentFieldName] = val[0].fondsName + } else if (this.isTableType === 2 && this.isDesFormType !== 'prearchiveLibrary') { + this.addOrUpdateForm[this.currentFieldName] = val[0].name + } else { + this.addOrUpdateForm[this.currentFieldName] = val[0].dictionaryName + } } this.$refs.popoverTable.clearSelection() this.popoverVisible = false - const index = this.autoMatic.findIndex(i => this.currentFieldName === i.fieldName) - if (index !== -1) { - this.handleAuto() + if (this.isDesFormType !== 'prearchiveLibrary') { + const index = this.autoMatic.findIndex(i => this.currentFieldName === i.fieldName) + if (index !== -1) { + this.handleAuto() + } } }, // popover - 当前选中得 diff --git a/src/views/components/category/SettingForm.vue b/src/views/components/category/SettingForm.vue index ccc1c3c..1622338 100644 --- a/src/views/components/category/SettingForm.vue +++ b/src/views/components/category/SettingForm.vue @@ -111,6 +111,10 @@ export default { thisFields: { type: Object, required: true + }, + isDesFormType: { + type: String, + default: '' } }, data() { @@ -217,11 +221,7 @@ export default { ], // 对应字典 dictionaryData: [], - dataOptions: [ - { value: 1, label: '全宗' }, - { value: 2, label: '档案分类' }, - { value: 3, label: '字典' } - ] + dataOptions: [] } }, watch: { @@ -236,6 +236,19 @@ export default { }, mounted() { this.form = this.thisFields + console.log('isDesFormType', this.isDesFormType) + if (this.isDesFormType === 'prearchiveLibrary') { + this.dataOptions = [ + { value: 1, label: '全宗' }, + { value: 3, label: '字典' } + ] + } else { + this.dataOptions = [ + { value: 1, label: '全宗' }, + { value: 2, label: '档案分类' }, + { value: 3, label: '字典' } + ] + } this.$nextTick(() => { if (!this.isAdd) { this.getForm() diff --git a/src/views/prearchiveLibrary/index.vue b/src/views/prearchiveLibrary/index.vue index bb4f664..1453946 100644 --- a/src/views/prearchiveLibrary/index.vue +++ b/src/views/prearchiveLibrary/index.vue @@ -35,7 +35,6 @@ -
diff --git a/src/views/prearchiveLibrary/module/batchFile.vue b/src/views/prearchiveLibrary/module/batchFile.vue index aca50f2..af876d0 100644 --- a/src/views/prearchiveLibrary/module/batchFile.vue +++ b/src/views/prearchiveLibrary/module/batchFile.vue @@ -37,7 +37,7 @@ /> -
+

字段取值

@@ -83,13 +83,13 @@ {{ selectedCategoryName }}
-
+

{{ item.categoryFieldId.fieldCnName }}

{{ item.categoryFieldId.isInput ? '显示': '隐藏' }}
-
+