Browse Source

文件库管理/专题库管理/门类修改

master
xuhuajiao 1 year ago
parent
commit
c4fdea9384
  1. 18
      src/api/system/category/category.js
  2. 50
      src/api/system/fileLibrary/fieldManage.js
  3. 64
      src/api/system/fileLibrary/fileLibrary.js
  4. 35
      src/api/system/fileLibrary/listBrowsing.js
  5. 26
      src/api/system/fileLibrary/orderingRule.js
  6. 4
      src/api/system/subjectLibraryField.js
  7. 1
      src/utils/request.js
  8. 30
      src/views/components/category/SettingForm.vue
  9. 5
      src/views/system/archivesCategory/descriptionPreview/index.vue
  10. 2
      src/views/system/archivesCategory/fieldManage/index.vue
  11. 3
      src/views/system/archivesCategory/fieldManage/module/form.vue
  12. 48
      src/views/system/archivesCategory/form.vue
  13. 18
      src/views/system/archivesCategory/publicScreening/index.vue
  14. 48
      src/views/system/fileLibraryManage/baseInfo/index.vue
  15. 13
      src/views/system/fileLibraryManage/descriptionPreview/index.vue
  16. 46
      src/views/system/fileLibraryManage/fieldManage/index.vue
  17. 10
      src/views/system/fileLibraryManage/fieldManage/module/form.vue
  18. 19
      src/views/system/fileLibraryManage/fieldManage/module/quickSetting.vue
  19. 176
      src/views/system/fileLibraryManage/fileNoFormat/index.vue
  20. 84
      src/views/system/fileLibraryManage/fileNoFormat/module/form.vue
  21. 72
      src/views/system/fileLibraryManage/fileNoFormat/module/sortDialog.vue
  22. 148
      src/views/system/fileLibraryManage/form.vue
  23. 57
      src/views/system/fileLibraryManage/index.vue
  24. 10
      src/views/system/fileLibraryManage/listBrowsing/index.vue
  25. 2
      src/views/system/fileLibraryManage/listBrowsing/module/form.vue
  26. 4
      src/views/system/fileLibraryManage/listBrowsing/module/sortDialog.vue
  27. 8
      src/views/system/fileLibraryManage/orderingRule/index.vue
  28. 4
      src/views/system/fileLibraryManage/orderingRule/module/form.vue
  29. 4
      src/views/system/fileLibraryManage/orderingRule/module/sortDialog.vue
  30. 4
      src/views/system/fileLibraryManage/sortDialog.vue
  31. 4
      src/views/system/subjectLibraryField/field/index.vue
  32. 5
      src/views/system/subjectLibraryManage/descriptionPreview/index.vue

18
src/api/system/category/category.js

@ -87,24 +87,6 @@ export function FetchEnabledFilingseal(data) {
})
}
// 新增公共筛选
export function FetchAddCategoryScreen(data) {
return request({
url: 'api/category/addCategoryScreen',
method: 'post',
data
})
}
// 删除公共筛选
export function FetchDelCategoryScreen(data) {
return request({
url: 'api/category/delCategoryScreen',
method: 'post',
data
})
}
// 门类下得字段
export function FetchInitCategoryField(params) {
return request({

50
src/api/system/fileLibrary/fieldManage.js

@ -0,0 +1,50 @@
import request from '@/utils/request'
// 编辑门类字段
export function add(data) {
data.isSystem = false
if (data.isDataType === 1) {
data.isDataTypeDetails = 'varchar'
} else if (data.isDataType === 2) {
data.isDataTypeDetails = 'int'
}
return request({
url: 'api/document/editDocumentDictionary',
method: 'post',
data
})
}
export function edit(data) {
if (data.isDataType === 1) {
data.isDataTypeDetails = 'varchar'
} else if (data.isDataType === 2) {
data.isDataTypeDetails = 'int'
}
return request({
url: 'api/document/editDocumentDictionary',
method: 'post',
data
})
}
// 删除门类类型菜单
export function del(ids) {
const params = { id: ids[0] }
return request({
url: 'api/document/deleteDocumentDictionary',
method: 'delete',
params
})
}
// 门类字段快速设置
export function FetchEditFast(data) {
return request({
url: 'api/document/editFast',
method: 'post',
data
})
}
export default { add, edit, del, FetchEditFast }

64
src/api/system/fileLibrary/fileLibrary.js

@ -0,0 +1,64 @@
import request from '@/utils/request'
// 获取树状菜单
export function FetchDocumentMenu() {
return request({
url: 'api/document/menu',
method: 'get'
})
}
export function add(data) {
return request({
url: 'api/document/editDocument',
method: 'post',
data
})
}
export function edit(data) {
return request({
url: 'api/document/editDocument',
method: 'post',
data
})
}
// 删除门类
export function del(ids) {
const params = { id: ids[0] }
return request({
url: 'api/document/delete',
method: 'delete',
params
})
}
// 修改门类树状菜单
export function sort(data) {
return request({
url: 'api/document/sort',
method: 'put',
data
})
}
// 门类下得字段
export function FetchInitCategoryField(params) {
return request({
url: 'api/document/initDocumentField',
method: 'get',
params
})
}
// 著录界面排序
export function FetchUpardicSort(data) {
return request({
url: 'api/document/upardicSort',
method: 'put',
data
})
}
export default { add, edit, del, sort, FetchDocumentMenu }

35
src/api/system/fileLibrary/listBrowsing.js

@ -0,0 +1,35 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/document/createListDisplay',
method: 'post',
data
})
}
export function edit(data) {
return request({
url: 'api/document/createListDisplay',
method: 'post',
data
})
}
// export function previewFormOrder(data) {
// return request({
// url: 'api/arc-display/sort',
// method: 'put',
// data
// })
// }
export function order(data) {
return request({
url: 'api/document/display-order',
method: 'put',
data
})
}
export default { add }

26
src/api/system/fileLibrary/orderingRule.js

@ -0,0 +1,26 @@
import request from '@/utils/request'
export function getDisplayField(params) {
return request({
url: 'api/document/getIsDisPlayState',
method: 'get',
params
})
}
export function edit(data) {
return request({
url: 'api/document/orderby',
method: 'put',
data
})
}
export function order(data) {
return request({
url: 'api/document/update-queue',
method: 'put',
data
})
}
export default { edit }

4
src/api/system/subjectLibraryField.js

@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/special/editField',
url: 'api/specialField/editField',
method: 'post',
data
})
@ -10,7 +10,7 @@ export function add(data) {
export function edit(data) {
return request({
url: 'api/special/editField',
url: 'api/specialField/editField',
method: 'post',
data
})

1
src/utils/request.js

@ -71,7 +71,6 @@ service.interceptors.response.use(
return Promise.reject(error)
}
}
console.log(code)
if (code) {
if (code === 401) {
store.dispatch('LogOut').then(() => {

30
src/views/components/category/SettingForm.vue

@ -192,7 +192,8 @@ export default {
return {
form: {
dictionaryId: {
id: null
id: null,
dictionaryName: null
}
},
rules: getRules(),
@ -217,7 +218,6 @@ export default {
{ value: 2, label: '档案分类' },
{ value: 3, label: '字典' }
]
// dictionaryId: null
}
},
watch: {
@ -228,10 +228,12 @@ export default {
}
}
},
created() {
console.log(this.form)
},
mounted() {
this.$nextTick(() => {
this.form = this.thisFields
console.log(this.form)
this.$nextTick(() => {
if (!this.isAdd) {
this.getForm()
}
@ -248,7 +250,10 @@ export default {
if (this.form.mateData !== 3) {
this.dictionaryData = []
this.form.dictionaryId.id = null
this.form.dictionaryId = {
id: null,
dictionaryName: null
}
}
//
@ -284,7 +289,10 @@ export default {
this.getDictrionaryList()
} else {
this.dictionaryData = []
this.form.dictionaryId.id = null
this.form.dictionaryId = {
id: null,
dictionaryName: null
}
}
}
},
@ -298,7 +306,10 @@ export default {
// this.dictionaryId = value
// },
changeDictType(value) {
this.form.dictionaryId.id = null
this.form.dictionaryId = {
id: null,
dictionaryName: null
}
},
// ''''
selectInputClass(value) {
@ -307,7 +318,10 @@ export default {
} else {
this.dictionaryData = []
this.form.mateData = null
this.form.dictionaryId.id = null
this.form.dictionaryId = {
id: null,
dictionaryName: null
}
}
//
if (this.form.isDataType === 2 && this.form.isInputClass !== 'number') {

5
src/views/system/archivesCategory/descriptionPreview/index.vue

@ -85,7 +85,10 @@ export default {
settingFormVisible: false, // - dialog
previewFormVisible: false, // form - dialog
fieldsActive: 0, // index
thisFields: { dictionaryConfigId: { dicName: null, id: null }}, //
thisFields: { dictionaryId: {
id: null,
dictionaryName: null
}}, //
editField: {},
isInputFields: [],
loading: false,

2
src/views/system/archivesCategory/fieldManage/index.vue

@ -132,7 +132,7 @@ export default {
},
[CRUD.HOOK.afterRefresh](crud) {
crud.data.forEach(function(item, index) {
item.dictionaryId = item.dictionaryId || { id: null }
item.dictionaryId = item.dictionaryId || { id: null, dictionaryName: null }
})
},
[CRUD.HOOK.beforeValidateCU](crud) {

3
src/views/system/archivesCategory/fieldManage/module/form.vue

@ -49,7 +49,8 @@ const defaultForm = {
displayLength: null,
mateData: null,
dictionaryId: {
id: null
id: null,
dictionaryName: null
}
}
export default {

48
src/views/system/archivesCategory/form.vue

@ -37,9 +37,6 @@
</el-radio-group>
</el-form-item>
</el-row>
<!-- <el-form-item v-if="crud.status.add === 1" label="选择模板" prop="templateId">
<treeselect v-model="form.templateId" :flat="true" :options="templateTree" placeholder="" style="width: 370px;" :disabled="form.isType !== 6" :normalizer="normalizer" :default-expand-level="2" @select="updateTemplateValue" />
</el-form-item> -->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="4" style="width: 580px;" />
</el-form-item>
@ -117,39 +114,11 @@ export default {
}
},
created() {
this.getSelectOptions()
},
methods: {
// option
beforeToAdd() {
this.form.isType = null
if (this.selectedCategory.isType === 1) {
this.selectOptions.forEach(item => {
if (item.value === 4) {
item.typeState = true
} else {
item.typeState = false
}
})
} else if (this.selectedCategory.isType === 2) {
this.selectOptions.forEach(item => {
if (item.value !== 3) {
item.typeState = true
} else {
item.typeState = false
}
})
this.form.isType = 3
} else if (this.selectedCategory.isType === 3) {
this.selectOptions.forEach(item => {
if (item.value !== 4) {
item.typeState = true
} else {
item.typeState = false
}
})
this.form.isType = 4
}
},
[CRUD.HOOK.beforeSubmit]() {
if (this.form.templateId) {
@ -172,29 +141,12 @@ export default {
this.form.isCase = null
this.form.arrangeType = null
}
// if (this.form.isType === 6) {
// // this.crudDict.getDicts()
// this.getTemplateTree()
// } else {
// this.form.dicExplain = null
// }
},
getTemplateTree() {
getCategoryTree().then(res => {
this.templateTree = res
})
},
getSelectOptions() {
// getCategoryType().then(res => {
// for (const key in res) {
// this.selectOptions.push({
// value: Number(key),
// label: res[key],
// typeState: false
// })
// }
// })
},
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children

18
src/views/system/archivesCategory/publicScreening/index.vue

@ -14,9 +14,9 @@
<el-dialog append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" title="公共筛选设置">
<div class="setting-dialog">
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="90px">
<el-form-item label="筛选项" prop="filterItem">
<el-select v-model="form.filterItem" style="width: 580px;">
<el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.label" />
<el-form-item label="筛选项" prop="fieldId">
<el-select v-model="form.fieldId" style="width: 580px;">
<el-option v-for="item in selectOptions" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-form>
@ -53,18 +53,22 @@
</template>
<script>
// import crudFilter from '@/api/system/category/filter'
import crudFilter from '@/api/system/category/filter'
import { FetchInitArchivesClass } from '@/api/system/archivesClass'
import CRUD, { presenter, header, form } from '@crud/crud'
import pagination from '@crud/Pagination'
const defaultForm = { id: null, filterItem: null }
const defaultForm = { id: null, fieldId: null }
export default {
name: 'PublicScreening',
components: { pagination },
cruds() {
return CRUD({ title: '公共筛选', url: 'api/category/getCategoryScreen' })
return CRUD({
title: '公共筛选',
url: 'api/category/getCategoryScreen',
crudMethod: { ...crudFilter }
})
},
mixins: [
presenter(),
@ -111,7 +115,7 @@ export default {
}
FetchInitArchivesClass(params).then((res) => {
console.log(res)
this.selectOptions = res
this.selectOptions = res.content
}).catch(err => {
console.log(err)
})

48
src/views/system/fileLibraryManage/baseInfo/index.vue

@ -8,10 +8,8 @@
<div class="info-item">
<span>节点类型</span>
<p v-if="selectedCategory.isType == 1">文件夹</p>
<p v-else-if="selectedCategory.isType == 2">项目</p>
<p v-else-if="selectedCategory.isType == 3">案卷</p>
<p v-else-if="selectedCategory.isType == 4">卷内</p>
<p v-else-if="selectedCategory.isType == 5">文件</p>
<p v-else-if="selectedCategory.isType == 2">分类</p>
<p v-else-if="selectedCategory.isType == 3"></p>
<p v-else />
</div>
<!-- v-if="selectedCategory.pid !== '0'" -->
@ -24,71 +22,31 @@
<p>{{ selectedCategory.remark ? selectedCategory.remark : '-' }}</p>
</div>
</div>
<!-- <div class="base-info-right">
<div v-if="selectedCategory.isType !== 1" class="info-item">
<span>档号规则</span>
<p>{{ fileNoFormatStr }}</p>
</div>
<div v-if="selectedCategory.isType !== 1" class="info-item">
<span>编码</span>
<p>WS01</p>
</div>
<div v-if="selectedCategory.isType !== 1" class="info-item">
<span>整理方式</span>
<p>按件整理</p>
</div>
<div v-if="selectedCategory.isType !== 1" class="info-item">
<span>是否装盒</span>
<p>装盒</p>
</div>
</div> -->
</div>
</template>
<script>
import { getNoFormatField } from '@/api/system/category/fileNoFormat'
export default {
name: 'BaseInfo',
props: {
selectedCategory: {
type: Object,
default: function() {
return {
cnName: '',
isType: '',
parentName: '',
isColumnLength: '',
remark: ''
}
return {}
}
}
},
data() {
return {
fileNoFormatStr: ''
}
},
watch: {
selectedCategory: function(newValue, oldValue) {
if (newValue && newValue.id) {
this.initData()
}
}
},
created() {
if (this.selectedCategory && this.selectedCategory.id) {
this.initData()
}
},
methods: {
initData() {
getNoFormatField({ categoryId: this.selectedCategory.id }).then((res) => {
this.fileNoFormatStr = ''
res.forEach((item) => {
this.fileNoFormatStr += item.fieldCnName + item.connector
})
})
}
}
}
</script>

13
src/views/system/fileLibraryManage/descriptionPreview/index.vue

@ -64,9 +64,9 @@
<script>
import PreviewForm from '@/views/components/category/PreviewForm'
import SettingForm from '@/views/components/category/SettingForm'
import { FetchInitCategoryField } from '@/api/system/category/category'
import { edit } from '@/api/category/fieldManage'
import { FetchUpardicSort } from '@/api/system/category/category'
import { FetchInitCategoryField } from '@/api/system/fileLibrary/fileLibrary'
import { edit } from '@/api/system/fileLibrary/fieldManage'
import { FetchUpardicSort } from '@/api/system/fileLibrary/fileLibrary'
export default {
name: 'DescriptionPreview',
components: { PreviewForm, SettingForm },
@ -85,7 +85,10 @@ export default {
settingFormVisible: false, // - dialog
previewFormVisible: false, // form - dialog
fieldsActive: 0, // index
thisFields: { dictionaryConfigId: { dicName: null, id: null }}, //
thisFields: { dictionaryId: {
id: null,
dictionaryName: null
}}, //
editField: {},
isInputFields: [],
loading: false,
@ -104,7 +107,7 @@ export default {
getArchivesType(setField) {
//
this.$refs.previewForm1.$refs['addOrUpdateForm'].clearValidate()
FetchInitCategoryField({ categoryId: this.selectedCategory.id, isType: 2 }).then(res => {
FetchInitCategoryField({ documentId: this.selectedCategory.id, isType: 2 }).then(res => {
this.allFieldsData.splice(0, this.allFieldsData.length)
this.isInputFields.splice(0, this.isInputFields.length)
if (!setField) {

46
src/views/system/fileLibraryManage/fieldManage/index.vue

@ -31,7 +31,7 @@
<span v-if="scope.row.isInputClass === 'textarea'">文本域</span>
</template>
</el-table-column>
<el-table-column prop="dictionaryConfigId.dicName" label="对应字典" min-width="85" show-overflow-tooltip />
<el-table-column prop="dictionaryId.dictionaryName" label="对应字典" min-width="85" show-overflow-tooltip />
<el-table-column prop="editLength" label="显示长度" min-width="85" />
<el-table-column label="显示一整行" min-width="110" align="center">
<template slot-scope="scope">
@ -67,24 +67,13 @@
</el-table>
<!--表单渲染-->
<eForm crud-tag="field" />
<quickSetting ref="quick" />
<el-dialog title="删除字段" :visible.sync="deleteVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定要删除当前字段吗</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<quickSetting ref="quick" @refresh="initData" />
</div>
</template>
<script>
import fieldCrudMethod from '@/api/category/fieldManage'
import fieldCrudMethod from '@/api/system/fileLibrary/fieldManage'
import eForm from './module/form'
import quickSetting from './module/quickSetting'
import CRUD, { presenter } from '@crud/crud'
@ -98,7 +87,7 @@ export default {
cruds() {
return CRUD({
tag: 'field',
url: 'api/arc-dic/manage',
url: 'api/document/initDocumentField',
crudMethod: fieldCrudMethod,
title: '字段',
optShow: {
@ -138,12 +127,12 @@ export default {
methods: {
//
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.categoryId = this.selectedCategory.id
this.crud.query.isType = 2
this.crud.query.documentId = this.selectedCategory.id
// this.crud.query.isType = 2
},
[CRUD.HOOK.afterRefresh](crud) {
crud.data.forEach(function(item, index) {
item.dictionaryConfigId = item.dictionaryConfigId || { id: null }
item.dictionaryId = item.dictionaryId || { id: null }
})
},
[CRUD.HOOK.beforeValidateCU](crud) {
@ -197,16 +186,16 @@ export default {
return
}
this.deleteData = data
this.deleteVisible = true
},
handleConfirm() {
this.deleteVisible = false
this.$confirm('此操作将删除当前所选' + this.crud.title + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
this.crud.delAllLoading = true
this.crud.doDelete(this.deleteData)
},
handleClose(done) {
this.deleteData = {}
done()
}).catch(() => {
})
},
digitFormatter(row, column, cellValue) {
return cellValue || '-'
@ -214,6 +203,9 @@ export default {
toQuick() {
this.$refs.quick.quickTableData = JSON.parse(JSON.stringify(this.crud.data))
this.$refs.quick.quickVisible = true
},
initData() {
this.crud.refresh()
}
}
}

10
src/views/system/fileLibraryManage/fieldManage/module/form.vue

@ -1,5 +1,5 @@
<template>
<el-dialog class="field-setting-dialog" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :before-close="crud.cancelCU" :visible="crud.status.cu > 0" :title="crud.status.title">
<el-dialog class="field-setting-dialog" :modal-append-to-body="false" append-to-body :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" :title="crud.status.title">
<div class="setting-dialog">
<SettingForm ref="editForm" :is-disabled="false" :is-add="crud.status.add === 1" :this-fields="form" />
<div slot="footer" class="dialog-footer">
@ -47,13 +47,17 @@ const defaultForm = {
displayformatType: null,
editLength: 196,
displayLength: null,
dictionaryId: null
mateData: null,
dictionaryId: {
id: null,
dictionaryName: null
}
}
export default {
components: { SettingForm },
mixins: [
form(function() {
return Object.assign({ categoryId: this.$parent.selectedCategory.id }, defaultForm)
return Object.assign({ documentId: this.$parent.selectedCategory.id }, defaultForm)
})
],
data() {

19
src/views/system/fileLibraryManage/fieldManage/module/quickSetting.vue

@ -1,6 +1,6 @@
<template>
<!--表单组件-->
<el-dialog title="快速设置" :visible.sync="quickVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body>
<el-dialog title="快速设置" :modal-append-to-body="false" append-to-body :close-on-click-modal="false" :visible.sync="quickVisible">
<div class="setting-dialog">
<el-table :data="quickTableData" style="width: 100%;" :max-height="tableHeight" row-key="id">
<el-table-column type="index" label="序号" width="100" align="center" />
@ -19,13 +19,14 @@
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click.native="quickVisible=false">取消</el-button>
<el-button type="primary" @click.native="handleSort">保存</el-button>
<el-button type="primary" @click.native="handleSave">保存</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { FetchEditFast } from '@/api/system/fileLibrary/fieldManage'
export default {
data() {
return {
@ -40,9 +41,17 @@ export default {
})
},
methods: {
handleSort() {
this.quickTableData.forEach((item, index) => {
item.sequence = index + 1
handleSave() {
FetchEditFast(this.quickTableData).then(res => {
if (res === 'SUCCESS') {
this.$message({
message: '快速设置字段成功',
type: 'success',
duration: 2500
})
this.$emit('refresh')
this.quickVisible = false
}
})
}
}

176
src/views/system/fileLibraryManage/fileNoFormat/index.vue

@ -1,176 +0,0 @@
<template>
<div class="format-main">
<div class="format-main-left">
<div class="head-container">
<el-button v-permission="permission.add" size="mini" icon="el-icon-plus" :disabled="table.left.selections.length == 0" @click="toAdd(table.left.selections)">
插入
</el-button>
</div>
<!--表格渲染-->
<el-table ref="leftTable" v-loading="table.left.loading" :data="table.left.data" style="width: 400px;" height="calc(100vh - 302px)" @selection-change="(val)=>selectionChangeHandler(val,'left')" @row-click="(row,column,e)=>clickRowHandler(row,column,e,'leftTable')">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="fieldCnName" label="字段名称" align="center" />
</el-table>
<!--表单渲染-->
<eForm />
</div>
<div class="format-main-right">
<div class="head-container">
<!-- type="danger" -->
<el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="delAllLoading" :disabled="table.right.selections.length === 0" @click="toDelete(table.right.selections)">
移除
</el-button>
<el-button v-permission="permission.edit" size="mini" icon="el-icon-edit" :disabled="table.right.selections.length === 0" @click="toEdit(table.right.selections)">
编辑
</el-button>
<el-button v-permission="permission.sort" icon="el-icon-sort" size="mini" :loading="sortLoading" :disabled="table.right.data <= 1" @click="toSort">排序</el-button>
</div>
<!--表格渲染-->
<el-table ref="rightTable" v-loading="table.right.loading" :data="table.right.data" style="min-width: 100%;" height="calc(100vh - 302px)" @selection-change="(val)=>selectionChangeHandler(val,'right')" @row-click="(row,column,e)=>clickRowHandler(row,column,e,'rightTable')">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="fieldCnName" label="组成字段" align="center" />
<el-table-column prop="connector" label="组成符号" align="center" />
</el-table>
<!--表单渲染-->
<eForm ref="cuform" @refresh="initData" />
</div>
<!--排序对话框组件-->
<sortDialog ref="sort" @refresh="initData" />
<!--删除对话框组件-->
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="deleteVisible">
<div class="setting-dialog">
<div class="tip-content">
<p class="tipMsg">此操作将移除当前所选字段</p>
<span>你是否还要继续?</span>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="deleteVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleDelConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { FetchInitCategoryField } from '@/api/system/category/category'
import { getNoFormatField, del } from '@/api/system/category/fileNoFormat'
import eForm from './module/form'
import sortDialog from './module/sortDialog'
import Vue from 'vue'
export default {
components: { eForm, sortDialog },
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
}
},
data() {
return {
permission: {
add: ['admin', 'fileNoFormat:add'],
edit: ['admin', 'fileNoFormat:edit'],
del: ['admin', 'fileNoFormat:delete'],
sort: ['admin', 'fileNoFormat:sort']
},
deleteVisible: false,
sortLoading: false,
delAllLoading: false,
table: {
left: {
data: [],
Loading: false,
selections: []
},
right: {
data: [],
Loading: false,
selections: []
}
}
}
},
watch: {
selectedCategory: function(newValue, oldValue) {
this.initData()
}
},
created() {
this.initData()
},
methods: {
initData() {
FetchInitCategoryField({ categoryId: this.selectedCategory.id, isType: 2 }).then((res) => {
this.table.left.data.splice(0, this.table.left.data.length)
res.forEach((item) => {
if (!item.isDisplayformat && item.isInput && !item.isAutomatic) {
this.table.left.data.push(item)
}
})
})
getNoFormatField({ categoryId: this.selectedCategory.id }).then((res) => {
this.table.right.data.splice(0, this.table.right.data.length)
res.forEach((item) => {
this.table.right.data.push(item)
})
})
},
clickRowHandler(row, column, e, tableName) {
this.$refs[tableName].toggleRowSelection(row)
},
selectionChangeHandler(val, tableName) {
this.table[tableName].selections = val
},
toAdd() {
this.table.left.selections.forEach((item) => {
Vue.set(item, 'connector', '-')
Vue.set(item, 'categoryId', this.selectedCategory.id)
})
this.$refs.cuform.title = '新增档号规则'
Vue.set(this.$refs.cuform.formData, 'fields', JSON.parse(JSON.stringify(this.table.left.selections)))
this.$refs.cuform.cuDialogVisible = true
},
toEdit() {
this.$refs.cuform.title = '编辑档号规则'
Vue.set(this.$refs.cuform.formData, 'fields', JSON.parse(JSON.stringify(this.table.right.selections)))
this.$refs.cuform.cuDialogVisible = true
},
toDelete() {
this.deleteVisible = true
},
handleDelConfirm() {
this.deleteVisible = false
this.delAllLoading = true
const deleteData = this.table.right.selections
del(deleteData).then((res) => {
this.delAllLoading = false
this.$message({
message: '删除成功',
type: 'success',
duration: 2500
})
this.initData()
})
},
toSort() {
this.$refs.sort.sortTableData = JSON.parse(JSON.stringify(this.table.right.data))
this.$refs.sort.sortVisible = true
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
// ::v-deep div.el-dialog__footer {
// text-align: center;
// }
// ::v-deep .el-table tr .el-table__cell {
// height: 40px;
// }
</style>

84
src/views/system/fileLibraryManage/fileNoFormat/module/form.vue

@ -1,84 +0,0 @@
<template>
<el-dialog class="addEdit-category-form" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="cuDialogVisible" :title="title">
<div class="setting-dialog">
<el-form ref="formData" :model="formData" size="small" label-width="90px">
<el-row v-for="(item) in formData.fields" :key="item.id">
<el-col :span="12">
<el-form-item label="组成字段">
<el-input v-model="item.fieldCnName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="组成符号">
<el-input v-model="item.connector" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cuDialogVisible=false">取消</el-button>
<el-button type="primary" :loading="loading" @click="save">确定</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { add, edit } from '@/api/system/category/fileNoFormat'
export default {
data() {
return {
cuDialogVisible: false,
formData: {},
title: '新增档号规则',
loading: false
}
},
methods: {
save() {
this.loading = true
if (this.title === '新增档号规则') {
const addData = this.formData.fields.map((item) => {
return {
dictionaryId: item.id,
fieldName: item.fieldName,
fieldCnName: item.fieldCnName,
connector: item.connector,
categoryId: item.categoryId
}
})
add(addData).then((res) => {
this.$message({
message: '保存成功',
type: 'success',
duration: 2500
})
this.cuDialogVisible = false
this.loading = false
this.$emit('refresh')
})
} else {
edit(this.formData.fields).then((res) => {
this.$message({
message: '保存成功',
type: 'success',
duration: 2500
})
this.cuDialogVisible = false
this.loading = false
this.$emit('refresh')
})
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.fields-list {
max-height: calc(100vh - 312px);
overflow-x: hidden;
overflow-y: auto;
position: relative;
}
</style>

72
src/views/system/fileLibraryManage/fileNoFormat/module/sortDialog.vue

@ -1,72 +0,0 @@
<template>
<!--表单组件-->
<el-dialog class="sort-dialog" title="排序" :visible.sync="sortVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body @opened="opened">
<div class="setting-dialog">
<i class="drag-tip">提示使用鼠标拖动调整顺序</i>
<el-table :data="sortTableData" class="fileno-format-sort" style="width: 100%;" :max-height="tableHeight" row-key="id">
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="fieldCnName" label="字段名称" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click.native="sortVisible=false">取消</el-button>
<el-button type="primary" @click.native="handleSort">保存</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import Sortable from 'sortablejs'
import { order } from '@/api/system/category/fileNoFormat'
export default {
data() {
return {
sortVisible: false,
sortTableData: [],
tableHeight: 0
}
},
mounted() {
this.$nextTick(() => {
this.tableHeight = window.innerHeight * 0.6
})
},
methods: {
//
rowDrop(className, targetName) {
//
const tbody = document.querySelector('.' + className + ' .el-table__body-wrapper tbody')
const that = this
Sortable.create(tbody, {
//
draggable: '.el-table__row',
onEnd({ newIndex, oldIndex }) {
if (newIndex === oldIndex) return
that[targetName].splice(newIndex, 0, that[targetName].splice(oldIndex, 1)[0])
}
})
},
opened() {
this.rowDrop('fileno-format-sort', 'sortTableData')
},
handleSort() {
this.sortTableData.forEach((item, index) => {
item.sequence = index + 1
})
order(this.sortTableData).then(() => {
this.sortVisible = false
this.$message({
message: '保存成功',
type: 'success',
duration: 2500
})
this.$emit('refresh')
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

148
src/views/system/fileLibraryManage/form.vue

@ -4,44 +4,19 @@
<div class="setting-dialog">
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="90px">
<el-row>
<el-form-item label="所属父级" prop="parentName">
<el-input v-model="selectedCategory.parentName" disabled />
<el-form-item label="所属父级" prop="pid">
<el-input v-model="parentName" disabled />
</el-form-item>
</el-row>
<el-form-item label="名称" prop="cnName">
<el-input v-model="form.cnName" />
</el-form-item>
<el-form-item label="节点类型" prop="isType">
<!-- :disabled="crud.status.edit === 1" -->
<!-- @change="changeType" -->
<el-select v-model="form.isType" style="width: 225px;">
<el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.label" />
<el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<!-- <el-form-item label="编码" prop="code">
<el-input v-model="form.code" />
</el-form-item> -->
<!-- <el-row v-if="isAdd">
<el-form-item label="是否装盒" prop="packing">
<el-radio-group v-model="form.packing" style="width: 580px;">
<el-radio label="1">装盒</el-radio>
<el-radio label="0">不装盒</el-radio>
</el-radio-group>
</el-form-item>
</el-row>
<el-row v-if="isAdd">
<el-form-item label="整理方式" prop="makeType">
<el-radio-group v-model="form.makeType" style="width: 580px;">
<el-radio label="piece">按件整理</el-radio>
<el-radio label="volumes">按卷整理</el-radio>
<el-radio label="project">项目管理三层</el-radio>
</el-radio-group>
</el-form-item>
</el-row> -->
<!-- <el-form-item v-if="crud.status.add === 1" label="选择模板" prop="templateId">
<treeselect v-model="form.templateId" :flat="true" :options="templateTree" placeholder="" style="width: 370px;" :disabled="form.isType !== 6" :normalizer="normalizer" :default-expand-level="2" @select="updateTemplateValue" />
</el-form-item> -->
<el-form-item label="备注">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="4" style="width: 580px;" />
</el-form-item>
</el-form>
@ -54,14 +29,9 @@
</template>
<script>
// getCategoryType
// import { getCategoryTree } from '@/api/category/category'
import { form } from '@crud/crud'
import CRUD from '@crud/crud'
// import Treeselect from '@riophae/vue-treeselect'
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// code: null, packing: '1', makeType: 'piece', templateId: null
const defaultForm = { id: null, parentName: null, cnName: null, isType: null, remark: null }
const defaultForm = { id: null, pid: null, cnName: null, isType: null, remark: null, categorySeq: null }
export default {
// components: { Treeselect },
mixins: [
@ -80,122 +50,42 @@ export default {
data() {
return {
pid: null,
// isAdd: false,
parentName: null,
rules: {
parentLevel: [
{ required: true, message: '所属父级不可为空', trigger: 'blur' }
],
// pid: [
// { required: true, message: '', trigger: 'blur' }
// ],
cnName: [
{ required: true, message: '名称不可为空', trigger: 'blur' }
],
isType: [
{ required: true, message: '节点类型不可为空', trigger: 'change' }
],
// code: [
// { required: true, message: '', trigger: 'blur' }
// ],
packing: [
{ required: true, message: '请选择是否装盒', trigger: 'change' }
],
makeType: [
{ required: true, message: '请选择装盒类型', trigger: 'change' }
]
},
selectOptions: [
{
value: '1',
label: '分类'
value: 1,
label: '文件夹'
},
{
value: '2',
label: '文件夹'
value: 2,
label: '分类'
}
],
templateTree: [],
selectedTemplateNode: {}
]
}
},
created() {
this.getSelectOptions()
},
methods: {
// option
beforeToAdd() {
this.form.isType = null
if (this.selectedCategory.isType === 1) {
this.selectOptions.forEach(item => {
if (item.value === 4) {
item.typeState = true
} else {
item.typeState = false
}
})
} else if (this.selectedCategory.isType === 2) {
this.selectOptions.forEach(item => {
if (item.value !== 3) {
item.typeState = true
} else {
item.typeState = false
}
})
this.form.isType = 3
} else if (this.selectedCategory.isType === 3) {
this.selectOptions.forEach(item => {
if (item.value !== 4) {
item.typeState = true
} else {
item.typeState = false
}
})
this.form.isType = 4
}
},
[CRUD.HOOK.beforeSubmit]() {
if (this.form.templateId) {
this.form.children = [this.selectedTemplateNode]
} else {
this.form.children = null
}
},
updateTemplateValue(node, instanceId) {
this.selectedTemplateNode = node
},
// changeType() {
// // this.isAdd = this.form.isType === '1'
// // if (this.form.isType === 6) {
// // // this.crudDict.getDicts()
// // this.getTemplateTree()
// // } else {
// // this.form.dicExplain = null
// // }
// },
// getTemplateTree() {
// getCategoryTree().then(res => {
// this.templateTree = res
// })
// },
getSelectOptions() {
// getCategoryType().then(res => {
// for (const key in res) {
// this.selectOptions.push({
// value: Number(key),
// label: res[key],
// typeState: false
// })
// }
// })
//
[CRUD.HOOK.afterValidateCU](crud) {
this.form.pid = this.selectedCategory.id
console.log(crud.form)
return true
}
// normalizer(node) {
// if (node.children && !node.children.length) {
// delete node.children
// }
// return {
// id: node.id,
// label: node.cnName,
// children: node.children,
// isDisabled: node.isType !== 2 && node.isType !== 3 && node.isType !== 5
// }
// }
}
}
</script>

57
src/views/system/fileLibraryManage/index.vue

@ -6,22 +6,21 @@
<div class="head-container">
<crudOperation :permission="permission">
<template v-slot:left>
<!-- crud.selections.length === 0 || crud.selections[0].isType === 2 || crud.selections[0].isType === 3 || crud.selections[0].isType === 5 -->
<el-button v-permission="permission.add" size="mini" :disabled="crud.selections.length === 0 || crud.selections[0].isType !== 1" @click="crud.toAdd">
<el-button v-permission="permission.add" size="mini" :disabled="crud.selections.length === 0 || crud.selections[0].isType !== 1 || crud.selections[0].isType === 3" @click="crud.toAdd">
<i class="iconfont icon-xinzeng" />
新增
</el-button>
<el-button v-permission="permission.edit" size="mini" :disabled="crud.selections.length !== 1 || crud.selections[0].pid === '0' || crud.selections[0].isType === 4" @click="crud.toEdit(crud.selections[0])">
<el-button v-permission="permission.edit" size="mini" :disabled="crud.selections.length !== 1 || crud.selections[0].pid === '0' || crud.selections[0].isType === 3" @click="crud.toEdit(crud.selections[0])">
<i class="iconfont icon-bianji" />
编辑
</el-button>
</template>
<template v-slot:right>
<el-button v-permission="permission.del" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0 || (crud.selections.length === 1 && crud.selections[0].pid === '0' ) || crud.selections[0].isType === 4" @click="toDelete(crud.selections)">
<el-button v-permission="permission.del" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0 || (crud.selections.length === 1 && crud.selections[0].pid === '0' ) || crud.selections[0].isType === 3" @click="toDelete(crud.selections)">
<i class="iconfont icon-shanchu" />
删除
</el-button>
<el-button v-permission="permission.sort" icon="el-icon-sort" size="mini" :loading="sortLoading" :disabled="brotherNodeNum <= 1 || crud.selections[0].pid === '0' || crud.selections[0].isType === 5" @click="toSort(crud.selections)">排序</el-button>
<el-button v-permission="permission.sort" icon="el-icon-sort" size="mini" :loading="sortLoading" :disabled="brotherNodeNum <= 1 || crud.selections[0].pid === '0' || crud.selections[0].isType === 3 " @click="toSort(crud.selections)">排序</el-button>
</template>
</crudOperation>
</div>
@ -32,13 +31,13 @@
<div class="tree-scroll">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.isType===1 " class="iconFolder">
<span v-if="data.isType === 1 " class="iconFolder">
{{ data.cnName }}
</span>
<span v-if="data.isType===2 || data.isType === 3 || data.isType===5" class="iconArch">
<span v-if="data.isType === 2" class="iconArch">
{{ data.cnName }}
</span>
<span v-if="data.isType===4" class="iconFile">
<span v-if="data.isType === 3" class="iconFile">
{{ data.cnName }}
</span>
</span>
@ -53,10 +52,10 @@
<span class="left-bottom-line" />
<ul class="tab-nav">
<li :class="{'active-tab-nav': activeIndex == 0}" @click="changeActiveTab(0)">基本信息<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 1}" @click="changeActiveTab(1)">字段管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 2}" @click="changeActiveTab(2)">著录界面设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 3}" @click="changeActiveTab(3)">列表界面设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 4" :class="{'active-tab-nav': activeIndex == 4}" @click="changeActiveTab(4)">排序规则设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 1}" @click="changeActiveTab(1)">字段管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 2}" @click="changeActiveTab(2)">著录界面设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 3}" @click="changeActiveTab(3)">列表界面设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 4}" @click="changeActiveTab(4)">排序规则设置<i /></li>
<!-- 最右侧装饰img -->
<span class="tab-right-img" />
</ul>
@ -96,7 +95,7 @@
</template>
<script>
import crudCategory from '@/api/category/category'
import crudDocument from '@/api/system/fileLibrary/fileLibrary'
import CRUD, { presenter, header } from '@crud/crud'
import eForm from './form'
import sortDialog from './sortDialog'
@ -114,8 +113,8 @@ export default {
cruds() {
return [
CRUD({
title: '分类', url: 'api/archives-type/menu',
crudMethod: { ...crudCategory },
title: '分类', url: 'api/document/menu',
crudMethod: { ...crudDocument },
optShow: {
add: false,
edit: false,
@ -186,8 +185,8 @@ export default {
},
[CRUD.HOOK.afterRefresh]() {
let currentKey
if (localStorage.getItem('currentCategoryKey')) {
currentKey = JSON.parse(localStorage.getItem('currentCategoryKey'))
if (localStorage.getItem('documentCategoryKey')) {
currentKey = JSON.parse(localStorage.getItem('documentCategoryKey'))
} else {
if (this.crud.data[0].isType === 1) {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
@ -221,30 +220,30 @@ export default {
}
this.changeActiveTab(0)
//
localStorage.setItem('currentCategoryKey', JSON.stringify(val))
localStorage.setItem('documentCategoryKey', JSON.stringify(val))
if (this.$refs.tree.getNode(val.pid) && this.$refs.tree.getNode(val.pid).childNodes) {
this.brotherNodeNum = this.$refs.tree.getNode(val.pid).childNodes.length
}
}
},
// - /
[CRUD.HOOK.beforeToAdd](crud, form, btn) {
const isCanAddKey = JSON.parse(localStorage.getItem('currentCategoryKey'))
if (isCanAddKey.isType === 4 || isCanAddKey.isType === 5) {
this.$message({
message: '此门类下不可新建门类',
type: 'error',
duration: 2500
})
return false
[CRUD.HOOK.beforeToAdd](crud, form) {
if (this.selectedCategory.pid === '0') {
this.$refs.eform.parentName = '文件库'
} else if (this.selectedCategory.isType === 1) {
this.$refs.eform.parentName = this.selectedCategory.cnName
}
this.$refs.eform.beforeToAdd()
},
//
[CRUD.HOOK.beforeToEdit](crud, form) {
this.$refs.eform.parentName = this.selectedCategory.parentName
},
// / -
[CRUD.HOOK.afterSubmit](crud, addedCategory) {
if (addedCategory) {
//
localStorage.setItem('currentCategoryKey', JSON.stringify(addedCategory))
localStorage.setItem('documentCategoryKey', JSON.stringify(addedCategory))
}
},
treeNodeSort(data) {
@ -265,7 +264,7 @@ export default {
this.crud.delAllLoading = true
this.crud.doDelete(this.deleteData).then((res) => {
//
localStorage.removeItem('currentCategoryKey')
localStorage.removeItem('documentCategoryKey')
})
},
handleClose(done) {

10
src/views/system/fileLibraryManage/listBrowsing/index.vue

@ -47,7 +47,7 @@
<!--排序对话框组件-->
<sortDialog ref="sort" @refresh="initData" />
<!--删除对话框组件-->
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="deleteVisible">
<el-dialog class="tip-dialog" title="提示" :visible.sync="deleteVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body>
<div class="setting-dialog">
<div class="tip-content">
<p class="tipMsg">此操作将移除当前所选字段</p>
@ -73,9 +73,9 @@
</div>
</template>
<script>
import { FetchInitCategoryField } from '@/api/system/category/category'
import { FetchInitCategoryField } from '@/api/system/fileLibrary/fileLibrary'
import { FetchInitArchivesView } from '@/api/archivesManage/archivesList'
import { add } from '@/api/category/listBrowsing'
import { add } from '@/api/system/fileLibrary/listBrowsing'
import eForm from './module/form'
import sortDialog from './module/sortDialog'
import Vue from 'vue'
@ -135,7 +135,7 @@ export default {
this.getBottomTableData()
},
getDisplayFieldData() {
FetchInitCategoryField({ categoryId: this.selectedCategory.id, isType: 2 }).then((res) => {
FetchInitCategoryField({ documentId: this.selectedCategory.id, isType: 2 }).then((res) => {
this.table.right.data.splice(0, this.table.right.data.length)
this.table.left.data.splice(0, this.table.left.data.length)
res.sort((item1, item2) => { return item1.displayOrder - item2.displayOrder }).forEach((item) => {
@ -151,7 +151,7 @@ export default {
})
},
getBottomTableData() {
FetchInitArchivesView({ categoryId: this.selectedCategory.id, isdel: false, page: 0, size: 10 }).then((res) => {
FetchInitArchivesView({ documentId: this.selectedCategory.id, isdel: false, page: 0, size: 10 }).then((res) => {
this.table.bottom.data.splice(0, this.table.bottom.data.length)
if (res && res.list) {
res.list.content.forEach((item) => {

2
src/views/system/fileLibraryManage/listBrowsing/module/form.vue

@ -31,7 +31,7 @@
</template>
<script>
import { add, edit } from '@/api/category/listBrowsing'
import { add, edit } from '@/api/system/fileLibrary/listBrowsing'
export default {
data() {
return {

4
src/views/system/fileLibraryManage/listBrowsing/module/sortDialog.vue

@ -1,6 +1,6 @@
<template>
<!--表单组件-->
<el-dialog class="sort-dialog" title="排序" :visible.sync="sortVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body @opened="opened">
<el-dialog class="sort-dialog" title="排序" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="sortVisible" @opened="opened">
<div class="setting-dialog">
<i class="drag-tip">提示使用鼠标拖动调整顺序</i>
<el-table :data="sortTableData" class="list-browsing-sort" style="width: 100%;" :max-height="tableHeight" row-key="id">
@ -17,7 +17,7 @@
<script>
import Sortable from 'sortablejs'
import { order } from '@/api/category/listBrowsing'
import { order } from '@/api/system/fileLibrary/listBrowsing'
export default {
data() {

8
src/views/system/fileLibraryManage/orderingRule/index.vue

@ -45,7 +45,7 @@
<!--排序对话框组件-->
<sortDialog ref="sort" @refresh="initData" />
<!--删除对话框组件-->
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="deleteVisible">
<el-dialog class="tip-dialog" title="提示" :visible.sync="deleteVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body>
<div class="setting-dialog">
<div class="tip-content">
<p class="tipMsg">此操作将移除当前所选字段</p>
@ -61,8 +61,8 @@
</template>
<script>
import { getDisplayField } from '@/api/system/category/orderingRule'
import { edit } from '@/api/system/category/orderingRule'
import { getDisplayField } from '@/api/system/fileLibrary/orderingRule'
import { edit } from '@/api/system/fileLibrary/orderingRule'
import eForm from './module/form'
import sortDialog from './module/sortDialog'
import Vue from 'vue'
@ -119,7 +119,7 @@ export default {
},
methods: {
initData() {
getDisplayField({ categoryId: this.selectedCategory.id, isDisPlayState: 'true' }).then((res) => {
getDisplayField({ documentId: this.selectedCategory.id, isDisPlayState: 'true' }).then((res) => {
this.table.right.data.splice(0, this.table.right.data.length)
this.table.left.data.splice(0, this.table.left.data.length)
res.sort((item1, item2) => { return item1.queue - item2.queue }).forEach((item) => {

4
src/views/system/fileLibraryManage/orderingRule/module/form.vue

@ -1,5 +1,5 @@
<template>
<el-dialog :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="cuDialogVisible" :title="title">
<el-dialog :close-on-click-modal="false" :visible.sync="cuDialogVisible" :modal-append-to-body="false" append-to-body :title="title">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
@ -31,7 +31,7 @@
</template>
<script>
import { edit } from '@/api/system/category/orderingRule'
import { edit } from '@/api/system/fileLibrary/orderingRule'
export default {
data() {
return {

4
src/views/system/fileLibraryManage/orderingRule/module/sortDialog.vue

@ -1,6 +1,6 @@
<template>
<!--表单组件-->
<el-dialog class="sort-dialog" title="排序" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="sortVisible" @opened="opened">
<el-dialog class="sort-dialog" title="排序" :visible.sync="sortVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body @opened="opened">
<div class="setting-dialog">
<i class="drag-tip">提示使用鼠标拖动调整顺序</i>
<el-table :data="sortTableData" class="ordering-rule-sort" style="width: 100%;;" :max-height="tableHeight" row-key="id">
@ -17,7 +17,7 @@
<script>
import Sortable from 'sortablejs'
import { order } from '@/api/system/category/orderingRule'
import { order } from '@/api/system/fileLibrary/orderingRule'
export default {
data() {

4
src/views/system/fileLibraryManage/sortDialog.vue

@ -17,7 +17,7 @@
<script>
import Sortable from 'sortablejs'
import { sort } from '@/api/category/category'
import { sort } from '@/api/system/fileLibrary/fileLibrary'
export default {
data() {
@ -52,7 +52,7 @@ export default {
},
handleSort() {
const data = this.sortTableData.map((value, index) => {
return { id: value.id, sort: index + 1 }
return { id: value.id, categorySeq: index + 1 }
})
this.sortTableData.forEach((item, index) => {
item.categorySeq = index + 1

4
src/views/system/subjectLibraryField/field/index.vue

@ -68,7 +68,7 @@ export default {
mixins: [presenter()],
cruds() {
return CRUD({
url: 'api/special/findGroupType',
url: 'api/specialField/findGroupType',
crudMethod: { add, edit },
optShow: {
add: true,
@ -191,7 +191,7 @@ export default {
const params = {
'isType': this.isType
}
exportFile(this.baseApi + '/api/documentField/download?' + qs.stringify(params, { indices: false }))
exportFile(this.baseApi + '/api/specialField/download?' + qs.stringify(params, { indices: false }))
this.crud.downloadLoading = false
}).catch(() => {
})

5
src/views/system/subjectLibraryManage/descriptionPreview/index.vue

@ -85,7 +85,10 @@ export default {
settingFormVisible: false, // - dialog
previewFormVisible: false, // form - dialog
fieldsActive: 0, // index
thisFields: { dictionaryConfigId: { dicName: null, id: null }}, //
thisFields: { dictionaryId: {
id: null,
dictionaryName: null
}}, //
editField: {},
isInputFields: [],
loading: false,

Loading…
Cancel
Save