diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index 46fdbe7..bebc04e 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -130,7 +130,7 @@ :label-in-value="false" :placeholder="$t('pleaseSelect')+item.dbFieldTxt" /> - - + @@ -168,6 +169,7 @@ import { getAction } from '../../api/manage.js' import { ajaxGetDictItems, getFormDictTreeList } from '../../api/api.js' import TreeSelection from '../selection/TreeSelection' import STreeSelect from '../STreeSelect' +import { isHasPermission } from '../../utils/hasPermission' export default { name: 'AddForm', @@ -275,12 +277,6 @@ export default { return [] } }, - // 是否需要进行国内标准的特殊校验 - domesticSpecialCheck: { - type: Boolean, - required: false, - default: false - }, // 选择标准字段和选择来源的对应关系 flagByField: { type: Object, @@ -318,7 +314,10 @@ export default { departSelectRange: [], // 选择部门的选择范围,传了就只能从这些里面选,不传就都能选 isEditSetData: false, // 正在编辑回显数据 oldMainDraftingUnit: '', // 上一次的主起草单位 - dictNotCodes: ['name_code'] // 用到字典的字段不传dictCode的字段 + dictNotCodes: ['name_code'], // 用到字典的字段不传dictCode的字段 + filePerm: { // 上传文件根据权限控制只能查看 + associated_file: 'enterpriseStandard:associatedFile:look' // 关联文件 + } } }, watch: { @@ -349,7 +348,15 @@ export default { } } }, + computed: { + fileIsDownload () { // 文件是否可下载 + // const isDisabled + // return Object.keys(filePerm).includes(uploadName) ? isHasPermission(filePerm[uploadName]) : + return true + } + }, methods: { + isHasPermission, add () { this.formInline = Object.assign({}, this.defaultValue) this.$forceUpdate() diff --git a/src/components/customField/Search.vue b/src/components/customField/Search.vue index 75114d9..6e29c1c 100644 --- a/src/components/customField/Search.vue +++ b/src/components/customField/Search.vue @@ -131,6 +131,24 @@ :placeholder="$t('pleaseSelect')+item.dbFieldTxt" /> + + + +
@@ -407,12 +443,12 @@ export default { getOptionsData () { const formList = Object.values(this.searchList).reduce((acc, cur) => acc.concat(cur), []) formList.forEach(item => { - if (item.fieldShowType === FieldType.TREE.value || item.fieldShowType === FieldType.TREE_SINGLE.value) { + if (item.fieldShowType === FieldType.TREE.value || item.fieldShowType === FieldType.TREE_SINGLE.value || item.fieldShowType === FieldType.TREE_MODAL_SELECT_SEARCH_DIFF.value) { // 展示类型是树选择,且有接口的 if (item.fieldHref) { getAction(item.fieldHref).then(res => { if (res.success) { - this.$set(this.optionsData, item.dbFieldName, res.result) + this.$set(this.optionsData, item.dbFieldName, res.result.records || res.result) } }) } else if (item.dictId) { diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js index b9576c5..7180129 100644 --- a/src/enums/commonEnums.js +++ b/src/enums/commonEnums.js @@ -28,7 +28,8 @@ export const FieldType = { // TEXT_LINK: { text: '输入框(链接)', value: '13' }, YEAR_PICKER: { text: '年份选择', value: '14' }, TREE_SINGLE: { text: '树形结构(单选)', value: '15' }, - TREE_MODAL_SELECT: { text: '树形弹框', value: '16' } + TREE_MODAL_SELECT: { text: '树形弹框', value: '16' }, + TREE_MODAL_SELECT_SEARCH_DIFF: { text: '树形弹框(带出子集和单线父级)', value: '17' } } export const TagsTypeEnums = new EsEnums({