Browse Source

预归档/需求修改

master
xuhuajiao 1 year ago
parent
commit
afa90a9e05
  1. 10
      src/api/system/category/category.js
  2. 15
      src/store/modules/user.js
  3. 16
      src/views/login.vue
  4. 2
      src/views/prearchiveLibrary/index.vue
  5. 55
      src/views/prearchiveLibrary/module/batchFile.vue
  6. 22
      src/views/prearchiveLibrary/module/data.json
  7. 10
      src/views/prearchiveLibrary/module/scope.vue
  8. 4
      src/views/system/archivesCategory/descriptionPreview/index.vue
  9. 2
      src/views/system/archivesCategory/fieldManage/index.vue
  10. 4
      src/views/system/archivesCategory/fileNoFormat/index.vue
  11. 6
      src/views/system/archivesCategory/listBrowsing/index.vue
  12. 4
      src/views/system/dept/index.vue
  13. 4
      src/views/system/fieldCorresManage/index.vue
  14. 2
      src/views/system/fileLibraryManage/listBrowsing/index.vue
  15. 2
      src/views/system/metadata/dataList/index.vue
  16. 32
      src/views/system/user/index.vue

10
src/api/system/category/category.js

@ -96,6 +96,14 @@ export function FetchInitCategoryField(params) {
})
}
export function FetchCategoryFieldManage(params) {
return request({
url: 'api/category/categoryFieldManage',
method: 'get',
params
})
}
// 著录界面排序
export function FetchUpardicSort(data) {
return request({
@ -114,4 +122,4 @@ export function FetchInitCategoryFieldByPid(params) {
})
}
export default { add, edit, del, FetchCategoryMenu, FetchInitCategoryField, FetchUpardicSort, FetchInitCategoryFieldByPid }
export default { add, edit, del, FetchCategoryMenu, FetchInitCategoryField, FetchCategoryFieldManage, FetchUpardicSort, FetchInitCategoryFieldByPid }

15
src/store/modules/user.js

@ -31,12 +31,15 @@ const user = {
const rememberMe = userInfo.rememberMe
return new Promise((resolve, reject) => {
login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
setToken(res.token, rememberMe)
commit('SET_TOKEN', res.token)
setUserInfo(res.user, commit)
// 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
commit('SET_LOAD_MENUS', true)
resolve()
console.log(res.message)
if (res.code !== 500) {
setToken(res.token, rememberMe)
commit('SET_TOKEN', res.token)
setUserInfo(res.user, commit)
// 第一次加载菜单时用到, 具体见 src 目录下的 permission.js
commit('SET_LOAD_MENUS', true)
}
resolve(res)
}).catch(error => {
reject(error)
})

16
src/views/login.vue

@ -183,11 +183,19 @@ export default {
}
this.$store
.dispatch('Login', user)
.then(() => {
.then((res) => {
this.loading = false
this.$router.push({ path: this.redirect || '/' })
})
.catch(() => {
if (res.code === 500) {
this.$message({
message: res.message,
type: 'warning',
duration: 5000
})
this.getCode()
} else {
this.$router.push({ path: this.redirect || '/' })
}
}).catch(res => {
this.loading = false
this.getCode()
})

2
src/views/prearchiveLibrary/index.vue

@ -241,7 +241,7 @@ export default {
},
getFormInfo(params, type) {
PrearchiveCrud.FetchDoeditDocument(params).then(data => {
const showFiledAll = data.showFiled.filter(item => item.displayOrder).sort((a, b) => a.displayOrder - b.displayOrder)
const showFiledAll = data.showFiled.filter(item => item.isSequence).sort((a, b) => a.isSequence - b.isSequence)
this.$nextTick(() => {
this.formPreviewData = showFiledAll
this.formVisible = true

55
src/views/prearchiveLibrary/module/batchFile.vue

@ -100,7 +100,7 @@
<div v-if="allFieldData.length === 0 && allCorrField.length === 0" class="empty-data" />
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="batchVisible = false">取消</el-button>
<el-button type="text" @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleComfirmBatchToFile">确定</el-button>
</div>
</div>
@ -172,7 +172,8 @@ export default {
leftLoading: false,
rightLoading: false,
isCorrField: true,
allCorrField: []
allCorrField: [],
isTest: false
}
},
watch: {
@ -217,6 +218,7 @@ export default {
this.allFieldData = []
this.allCorrField = []
this.isCorrField = true
this.isTest = false
},
//
getCategoryDataTree() {
@ -290,7 +292,23 @@ export default {
})
},
handleSelectCategory(val) {
console.log(val)
this.selectedCategoryName = val.cnName
this.form.categoryId = val.id
this.batchCategory = val
// this.getArchivesScopeByCategoryId()
const params = {
'categoryId': this.form.categoryId
}
FetchArchivesScopeByCategoryId(params).then(res => {
if (Array.isArray(res) && res.length === 1) {
this.form.scope = res[0].scopeName
} else {
this.form.scope = null
console.log('有多个“归档范围”')
}
this.getCheckRepeat()
})
},
//
selectScope() {
@ -337,6 +355,7 @@ export default {
this.selectStatus = []
this.allFieldData = []
this.form.ruleName = res.id
this.getDetailsByDocumentIdAndCategoryId()
}
this.fieldLoading = false
@ -346,19 +365,36 @@ export default {
selectChangeFiedType(index) {
this.options.forEach((item) => {
if (this.selectStatus[index].fiedType === 2) {
this.selectStatus.splice(index, 1, { mode: false, fiedType: this.selectStatus[index].fiedType, value: this.allFieldData[index].categoryFieldId.isDefaultValue, field: item, isInput: item.isInput })
if (!this.isCorrField) {
this.selectStatus.splice(index, 1, { mode: false, fiedType: this.selectStatus[index].fiedType, value: this.selectStatus[index].fiedType === 1 ? this.selectStatus[index].value : this.allCorrField[index].isDefaultValue, field: item, isInput: item.isInput })
} else {
this.selectStatus.splice(index, 1, { mode: false, fiedType: this.selectStatus[index].fiedType, value: this.allFieldData[index].categoryFieldId.isDefaultValue, field: item, isInput: item.isInput })
}
} else {
if (!this.isCorrField) {
this.isTest = true
} else {
this.isTest = false
}
this.selectStatus.splice(index, 1, { mode: true, fiedType: this.selectStatus[index].fiedType, value: '', field: item, isInput: item.isInput })
}
})
},
selectChange(index) {
this.options.forEach((item) => {
if (this.selectStatus[index].fiedType === 1) {
this.selectStatus.splice(index, 1, { mode: false, fiedType: 1, value: this.selectStatus[index].value, field: item, isInput: item.isInput })
if (!this.isCorrField && this.allCorrField[index].isDefaultValue !== '') {
if (this.isTest) {
this.selectStatus.splice(index, 1, { mode: false, fiedType: 1, value: this.selectStatus[index].value, field: item, isInput: item.isInput })
} else {
this.selectStatus.splice(index, 1, { mode: false, fiedType: 2, value: this.allCorrField[index].isDefaultValue === '' ? this.selectStatus[index].value : this.allCorrField[index].isDefaultValue, field: item, isInput: item.isInput })
}
} else {
if (item.fieldCnName === this.selectStatus[index].value) {
this.selectStatus.splice(index, 1, { mode: false, fiedType: this.allFieldData[index].categoryFieldId.isDefaultValue === '' ? 1 : 2, value: this.allFieldData[index].categoryFieldId.isDefaultValue === '' ? this.selectStatus[index].value : this.allFieldData[index].categoryFieldId.isDefaultValue, field: item, isInput: item.isInput })
if (this.selectStatus[index].fiedType === 1) {
this.selectStatus.splice(index, 1, { mode: false, fiedType: 1, value: this.selectStatus[index].value, field: item, isInput: item.isInput })
} else {
if (item.fieldCnName === this.selectStatus[index].value) {
this.selectStatus.splice(index, 1, { mode: false, fiedType: this.allFieldData[index].categoryFieldId.isDefaultValue === '' ? 1 : 2, value: this.allFieldData[index].categoryFieldId.isDefaultValue === '' ? this.selectStatus[index].value : this.allFieldData[index].categoryFieldId.isDefaultValue, field: item, isInput: item.isInput })
}
}
}
})
@ -378,7 +414,10 @@ export default {
})
this.selectedCategoryName = null
this.allFieldData = []
done()
this.allCorrField = []
this.isTest = false
this.batchCategory = {}
// done()
},
handleComfirmBatchToFile() {
// const getIndicesByMode = (modeValue) => {

22
src/views/prearchiveLibrary/module/data.json

@ -1,22 +0,0 @@
[
{
"id": 1,
"label": "字段A",
"isType": 1
},
{
"id": 2,
"label": "字段B",
"isType": 0
},
{
"id": 3,
"label": "字段C",
"isType": 1
},
{
"id": 4,
"label": "字段D",
"isType": 1
}
]

10
src/views/prearchiveLibrary/module/scope.vue

@ -25,7 +25,7 @@
<div class="raido-main" style="height: 395px;">
<el-table
ref="table"
v-loading="crud.loading"
v-loading="loading"
lazy
:show-header="false"
:data="tableData"
@ -75,6 +75,7 @@ export default {
return {
scopeVisible: false,
selectedCategory: null,
loading: false,
tableData: [],
selections: [],
defaultProps: { children: 'children', label: 'cnName' }
@ -124,10 +125,12 @@ export default {
if (val.pid !== '0') {
Vue.set(this.selectedCategory, 'parentName', this.$refs.tree2.getNode(val.pid).data.cnName)
}
this.loading = true
this.getInitArchivesScope(this.selectedCategory)
}
},
getInitArchivesScope(data) {
this.tableData = []
let params
if (data.isType !== 3) {
params = {
@ -148,6 +151,7 @@ export default {
}
return item
})
this.loading = false
})
},
getSonClass(tree, treeNode, resolve) {
@ -183,6 +187,8 @@ export default {
},
cancelScope() {
this.scopeVisible = false
this.$refs.table.clearSelection() //
this.selections = []
},
confirmedScope() {
this.scopeVisible = false
@ -191,6 +197,8 @@ export default {
},
handleClose(done) {
this.scopeVisible = false
this.$refs.table.clearSelection() //
this.selections = []
done()
}
}

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

@ -64,7 +64,7 @@
<script>
import PreviewForm from '@/views/components/category/PreviewForm'
import SettingForm from '@/views/components/category/SettingForm'
import { FetchInitCategoryField } from '@/api/system/category/category'
import { FetchCategoryFieldManage } from '@/api/system/category/category'
import { edit } from '@/api/system/category/fieldManage'
import { FetchUpardicSort } from '@/api/system/category/category'
export default {
@ -107,7 +107,7 @@ export default {
getArchivesType(setField) {
//
this.$refs.previewForm1.$refs['addOrUpdateForm'].clearValidate()
FetchInitCategoryField({ categoryId: this.selectedCategory.id, isType: 2 }).then(res => {
FetchCategoryFieldManage({ categoryId: this.selectedCategory.id, isType: 2 }).then(res => {
this.allFieldsData.splice(0, this.allFieldsData.length)
this.isInputFields.splice(0, this.isInputFields.length)
if (!setField) {

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

@ -87,7 +87,7 @@ export default {
cruds() {
return CRUD({
tag: 'field',
url: 'api/category/initCategoryField',
url: 'api/category/categoryFieldManage',
crudMethod: fieldCrudMethod,
title: '字段',
optShow: {

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

@ -55,7 +55,7 @@
</template>
<script>
import { FetchInitCategoryField } from '@/api/system/category/category'
import { FetchCategoryFieldManage } from '@/api/system/category/category'
import { getNoFormatField, del } from '@/api/system/category/fileNoFormat'
import eForm from './module/form'
import sortDialog from './module/sortDialog'
@ -106,7 +106,7 @@ export default {
},
methods: {
initData() {
FetchInitCategoryField({ categoryId: this.selectedCategory.id, isType: 2 }).then((res) => {
FetchCategoryFieldManage({ 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) {

6
src/views/system/archivesCategory/listBrowsing/index.vue

@ -63,7 +63,7 @@
<!-- @selection-change="selectionChangeHandler" -->
<el-table ref="table" :key="tableKey" v-loading="table.bottom.loading" :data="table.bottom.data" style="min-width: 100%;" height="300" class="nowrap-tab">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<!-- <el-table-column type="index" label="序号" width="55" align="center" /> -->
<el-table-column v-for="field in table.right.data" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
@ -73,7 +73,7 @@
</div>
</template>
<script>
import { FetchInitCategoryField } from '@/api/system/category/category'
import { FetchCategoryFieldManage } from '@/api/system/category/category'
import { FetchInitArchivesView } from '@/api/archivesManage/archivesList'
import { add } from '@/api/system/category/listBrowsing'
import eForm from './module/form'
@ -135,7 +135,7 @@ export default {
this.getBottomTableData()
},
getDisplayFieldData() {
FetchInitCategoryField({ categoryId: this.selectedCategory.id, isType: 2 }).then((res) => {
FetchCategoryFieldManage({ categoryId: 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) => {

4
src/views/system/dept/index.vue

@ -173,7 +173,8 @@ export default {
reset: true,
download: false,
group: false
}})
}
})
},
mixins: [presenter(), header(), form(defaultForm), crud()],
//
@ -548,6 +549,7 @@ export default {
'deptsIds': ids
}
exportFile(this.baseApi + '/api/depts/download?' + qs.stringify(params, { indices: false }))
this.crud.downloadLoading = false
}).catch(() => {
})
},

4
src/views/system/fieldCorresManage/index.vue

@ -111,7 +111,7 @@
//
import { FetchDocumentMenu, FetchInitDocumentFieldByPid, FetchInitDocumentField } from '@/api/system/fileLibrary/fileLibrary'
//
import { FetchCategoryMenu, FetchInitCategoryFieldByPid, FetchInitCategoryField } from '@/api/system/category/category'
import { FetchCategoryMenu, FetchInitCategoryFieldByPid, FetchCategoryFieldManage } from '@/api/system/category/category'
import crudFieldMate from '@/api/system/fieldMate'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@ -301,7 +301,7 @@ export default {
})
})
//
FetchInitCategoryField({ categoryId: row.category_id, isType: 2 }).then((res) => {
FetchCategoryFieldManage({ categoryId: row.category_id, isType: 2 }).then((res) => {
this.$refs.corresForm.targetData = res.sort((a, b) => {
if (a.isInput !== b.isInput) {
return a.isInput ? -1 : 1

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

@ -63,7 +63,7 @@
<!-- @selection-change="selectionChangeHandler" -->
<el-table ref="table" :key="tableKey" v-loading="table.bottom.loading" :data="table.bottom.data" style="min-width: 100%;" height="300" class="nowrap-tab">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<!-- <el-table-column type="index" label="序号" width="55" align="center" /> -->
<el-table-column v-for="field in table.right.data" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}

2
src/views/system/metadata/dataList/index.vue

@ -152,7 +152,7 @@ export default {
this.mform = form
},
handleComfire() {
this.$refs['form'].validate((valid) => {
this.$refs['mform'].validate((valid) => {
if (valid) {
const params = {
'metadataId': this.selectedTreeItem.id,

32
src/views/system/user/index.vue

@ -23,7 +23,7 @@
<div class="head-container">
<div class="head-search">
<!-- 搜索 -->
<el-input v-model="query.blurry" clearable size="small" placeholder="输入名称或者邮箱搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
<el-input v-model="query.blurry" clearable size="small" placeholder="输入账号活者用户名搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
<date-range-picker v-model="blurryTime" class="date-item" />
<el-select v-model="query.userStatus" clearable size="small" placeholder="状态" class="filter-item" style="width: 100px" @change="crud.toQuery">
<i slot="prefix" class="iconfont icon-zhuangtai" />
@ -141,12 +141,15 @@
<!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @row-click="clickRowHandler" @selection-change="crud.selectionChangeHandler">
<el-table-column :selectable="checkboxT" type="selection" align="center" width="55" />
<el-table-column :show-overflow-tooltip="true" prop="username" label="账号" />
<el-table-column :show-overflow-tooltip="true" prop="nickName" label="用户名" />
<el-table-column prop="gender" label="性别" width="60" />
<el-table-column :show-overflow-tooltip="true" prop="phone" label="电话" />
<el-table-column :show-overflow-tooltip="true" prop="email" label="邮箱" />
<el-table-column :show-overflow-tooltip="true" prop="deptsName" label="部门" />
<el-table-column prop="username" label="账号" />
<el-table-column prop="nickName" label="用户名" />
<el-table-column prop="gender" label="性别" width="60" align="center" />
<!-- <el-table-column :show-overflow-tooltip="true" prop="phone" label="电话" />
<el-table-column :show-overflow-tooltip="true" prop="email" label="邮箱" /> -->
<el-table-column prop="fondsName" label="全宗" />
<el-table-column prop="deptsName" label="部门" />
<el-table-column prop="job" label="岗位" />
<el-table-column prop="roleIds" label="角色" />
<el-table-column label="状态" align="center" prop="enabled" width="60">
<template slot-scope="scope">
<el-switch v-model="scope.row.enabled" :disabled="user.id === scope.row.userId" active-color="#409EFF" inactive-color="#F56C6C" :active-value="1" :inactive-value="0" @change="changeEnabled(scope.row, scope.row.enabled)" />
@ -526,16 +529,25 @@ export default {
},
//
handleNodeClick(data) {
console.log(data)
const selectedKey = this.$refs.tree.getCurrentNode()
const selectedParentVal = this.$refs.tree.getNode(selectedKey).parent.data.id
console.log(selectedParentVal)
if (data.pid === 0) {
this.query.deptsId = null
this.query.deptsName = null
this.leftFondsId = null
this.leftDeptsId = null
} else {
this.query.deptsId = data.id
this.query.deptsName = data.deptsName
if (data.fondsNo) {
this.query.fondsId = data.id
this.query.deptsId = null
this.query.deptsName = null
} else {
this.query.deptsId = data.id
this.query.deptsName = data.deptsName
}
this.leftFondsId = selectedParentVal
this.leftDeptsId = data.id
}
@ -544,7 +556,7 @@ export default {
getFondsDatas() {
const parent = {}
parent.id = 0
parent.fondsName = '全宗选择'
parent.fondsName = '全宗部门选择'
FetchFondsAll().then(res => {
res.forEach(item => {
item.children = item.depts

Loading…
Cancel
Save