Browse Source

档案门类

master
xuhuajiao 2 years ago
parent
commit
71f855de09
  1. 26
      src/api/system/archivesClass.js
  2. 8
      src/api/system/category/fileNoFormat.js
  3. 22
      src/views/components/category/SettingForm.vue
  4. 4
      src/views/system/archivesCategory/fieldManage/index.vue
  5. 2
      src/views/system/archivesCategory/fieldManage/module/form.vue
  6. 2
      src/views/system/archivesClassify/index.vue
  7. 4
      src/views/system/fileLibraryManage/fieldManage/module/form.vue

26
src/api/system/archivesClass.js

@ -9,4 +9,28 @@ export function FetchInitArchivesClass(params) {
}) })
} }
export default { FetchInitArchivesClass }
export function add(data) {
return request({
url: 'api/archivesClass/editArchivesClass',
method: 'post',
data
})
}
export function edit(data) {
return request({
url: 'api/archivesClass/editArchivesClass',
method: 'post',
data
})
}
export function del(data) {
return request({
url: 'api/archivesClass/delArchivesClass',
method: 'post',
data
})
}
export default { add, edit, del, FetchInitArchivesClass }

8
src/api/system/category/fileNoFormat.js

@ -2,7 +2,7 @@ import request from '@/utils/request'
export function getNoFormatField(params) { export function getNoFormatField(params) {
return request({ return request({
url: 'api/category/list',
url: 'api/category/getAllSetting',
method: 'get', method: 'get',
params params
}) })
@ -10,7 +10,7 @@ export function getNoFormatField(params) {
export function edit(data) { export function edit(data) {
return request({ return request({
url: 'api/dic-setting/update',
url: 'api/category/updateSetting',
method: 'put', method: 'put',
data data
}) })
@ -26,7 +26,7 @@ export function add(data) {
export function order(data) { export function order(data) {
return request({ return request({
url: 'api/dic-setting/squence',
url: 'api/category/squenceSetting',
method: 'put', method: 'put',
data data
}) })
@ -34,7 +34,7 @@ export function order(data) {
export function del(data) { export function del(data) {
return request({ return request({
url: 'api/dic-setting/delete',
url: 'api/category/deleteSetting',
method: 'delete', method: 'delete',
data data
}) })

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

@ -31,14 +31,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="对应数据" prop="dictionaryConfigId">
<el-input v-if="isDisabled" v-model="form.dictionaryConfigId.dicName" disabled />
<el-form-item label="对应数据" prop="dictionaryId">
<el-input v-if="isDisabled" v-model="form.dictionaryId.dictionaryName" disabled />
<!-- @change="selectDictionary" --> <!-- @change="selectDictionary" -->
<div v-else class="dictionary-selected"> <div v-else class="dictionary-selected">
<el-select v-model="form.mateData" class="dictionary-left" placeholder="" value-key="id" :disabled="form.isInputClass !== 'select' && form.isInputClass !== 'popover'" @change="changeDictType"> <el-select v-model="form.mateData" class="dictionary-left" placeholder="" value-key="id" :disabled="form.isInputClass !== 'select' && form.isInputClass !== 'popover'" @change="changeDictType">
<el-option v-for="item in dataOptions" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in dataOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-select v-model="form.dictionaryConfigId.id" class="dictionary-right" placeholder="" value-key="id" :disabled="form.mateData !== 3">
<el-select v-model="form.dictionaryId.id " class="dictionary-right" placeholder="" value-key="id" :disabled="form.mateData !== 3">
<el-option v-for="item in dictionaryData" :key="item.id" :label="item.dictionaryName" :value="item.id" /> <el-option v-for="item in dictionaryData" :key="item.id" :label="item.dictionaryName" :value="item.id" />
</el-select> </el-select>
</div> </div>
@ -143,7 +143,7 @@ export default {
} }
// //
var checkDictionaryConfigId = (rule, value, callback) => { var checkDictionaryConfigId = (rule, value, callback) => {
if ((this.form.isInputClass === 'select' || this.form.isInputClass === 'popover') && !this.form.dictionaryConfigId.id && this.form.mateData === 3) {
if ((this.form.isInputClass === 'select' || this.form.isInputClass === 'popover') && !this.form.dictionaryId.id && this.form.mateData === 3) {
callback(new Error('对应字典项不可为空!')) callback(new Error('对应字典项不可为空!'))
} else { } else {
callback() callback()
@ -177,7 +177,7 @@ export default {
editLength: [ editLength: [
{ validator: checkEditLength, trigger: 'blur' } { validator: checkEditLength, trigger: 'blur' }
], ],
dictionaryConfigId: [
dictionaryId: [
{ validator: checkDictionaryConfigId, trigger: 'blur' } { validator: checkDictionaryConfigId, trigger: 'blur' }
], ],
fillingDigit: [ fillingDigit: [
@ -191,7 +191,7 @@ export default {
} }
return { return {
form: { form: {
dictionaryConfigId: {
dictionaryId: {
id: null id: null
} }
}, },
@ -248,7 +248,7 @@ export default {
if (this.form.mateData !== 3) { if (this.form.mateData !== 3) {
this.dictionaryData = [] this.dictionaryData = []
this.form.dictionaryConfigId.id = null
this.form.dictionaryId.id = null
} }
// //
@ -284,7 +284,7 @@ export default {
this.getDictrionaryList() this.getDictrionaryList()
} else { } else {
this.dictionaryData = [] this.dictionaryData = []
this.form.dictionaryConfigId.id = null
this.form.dictionaryId.id = null
} }
} }
}, },
@ -298,7 +298,7 @@ export default {
// this.dictionaryId = value // this.dictionaryId = value
// }, // },
changeDictType(value) { changeDictType(value) {
this.form.dictionaryConfigId.id = null
this.form.dictionaryId.id = null
}, },
// '''' // ''''
selectInputClass(value) { selectInputClass(value) {
@ -307,7 +307,7 @@ export default {
} else { } else {
this.dictionaryData = [] this.dictionaryData = []
this.form.mateData = null this.form.mateData = null
this.form.dictionaryConfigId.id = null
this.form.dictionaryId.id = null
} }
// //
if (this.form.isDataType === 2 && this.form.isInputClass !== 'number') { if (this.form.isDataType === 2 && this.form.isInputClass !== 'number') {
@ -382,7 +382,7 @@ export default {
// submitForm(formName) { // submitForm(formName) {
// // // //
// if (this.form.isInputClass === 'select' || this.form.isInputClass === 'popover') { // if (this.form.isInputClass === 'select' || this.form.isInputClass === 'popover') {
// if (!this.form.dictionaryConfigId.id) {
// if (!this.form.dictionaryId.id ) {
// this.$message.error('') // this.$message.error('')
// return // return
// } // }

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

@ -31,7 +31,7 @@
<span v-if="scope.row.isInputClass === 'textarea'">文本域</span> <span v-if="scope.row.isInputClass === 'textarea'">文本域</span>
</template> </template>
</el-table-column> </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 prop="editLength" label="显示长度" min-width="85" />
<el-table-column label="显示一整行" min-width="110" align="center"> <el-table-column label="显示一整行" min-width="110" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -132,7 +132,7 @@ export default {
}, },
[CRUD.HOOK.afterRefresh](crud) { [CRUD.HOOK.afterRefresh](crud) {
crud.data.forEach(function(item, index) { crud.data.forEach(function(item, index) {
item.dictionaryConfigId = item.dictionaryConfigId || { id: null }
item.dictionaryId = item.dictionaryId || { id: null }
}) })
}, },
[CRUD.HOOK.beforeValidateCU](crud) { [CRUD.HOOK.beforeValidateCU](crud) {

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

@ -48,7 +48,7 @@ const defaultForm = {
editLength: 196, editLength: 196,
displayLength: null, displayLength: null,
mateData: null, mateData: null,
dictionaryConfigId: {
dictionaryId: {
id: null id: null
} }
} }

2
src/views/system/archivesClassify/index.vue

@ -154,7 +154,7 @@ export default {
name: 'Classify', name: 'Classify',
components: { crudOperation, pagination, Treeselect }, components: { crudOperation, pagination, Treeselect },
cruds() { cruds() {
return CRUD({ title: '分类', url: 'api/category/menu',
return CRUD({ title: '分类', url: 'api/archivesClass/initArchivesClass',
crudMethod: { ...crudCategory }, crudMethod: { ...crudCategory },
sort: [] }) sort: [] })
}, },

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

@ -47,9 +47,7 @@ const defaultForm = {
displayformatType: null, displayformatType: null,
editLength: 196, editLength: 196,
displayLength: null, displayLength: null,
dictionaryConfigId: {
id: null
}
dictionaryId: null
} }
export default { export default {
components: { SettingForm }, components: { SettingForm },

Loading…
Cancel
Save